<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-if="showSearch" label-width="80px">
      <el-form-item label="" prop="newStatus">
        <el-radio-group v-model="queryParams.newStatus" size="small" @change="changeTheme" fill="#66b1ff">
          <el-radio :label="0">未上架</el-radio>
          <el-radio :label="1">已上架</el-radio>
          <el-radio :label="null">所有</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="" prop="productNo">
        <el-input v-model="queryParams.productNo" placeholder="采购货号" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>

      <el-form-item label="" prop="colorProperty">
        <el-input v-model="queryParams.colorProperty" placeholder="颜色属性" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>

      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
        <el-button :icon="!isOpen ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" size="mini"
          @click="shouqi">展开/收起</el-button>
        <!--  -->
        <el-button :style="istxChange ? 'background-color: #409eff;color: white;' : ''" icon="el-icon-edit" size="mini"
          @click="getistxChange" type="info">快捷编辑</el-button>
        <!-- <el-button icon="el-icon-edit" size="mini" @click="submitview">保存</el-button> -->
      </el-form-item>

      <div v-if="isOpen">
        <el-form-item label="" prop="manufacturerCode">
          <el-select v-model="queryParams.manufacturerCode" placeholder="请选择厂家代码" clearable filterable>
            <el-option v-for="dict in dict.type.sys_product_coder" :key="dict.value" :label="dict.label"
              :value="dict.value" />
          </el-select>
        </el-form-item>

        <el-form-item label="" prop="newChannel">
          <el-select v-model="queryParams.newChannel" placeholder="上新渠道" clearable>
            <el-option v-for="dict in dict.type.sys_product_qudao" :key="dict.value" :label="dict.label"
              :value="dict.value" />
          </el-select>
        </el-form-item>

        <el-form-item label="" prop="operationMainProducts" label-width="120px">
          <el-input v-model="queryParams.operationMainProducts" placeholder="商品-主推款" clearable
            @keyup.enter.native="handleQuery" />
        </el-form-item>

        <el-form-item label="" prop="newTimeStart" label-width="150px">
          <el-date-picker clearable v-model="queryParams.newTimeStart" type="date" value-format="yyyy-MM-dd"
            placeholder="商品上架开始">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="" prop="newTimeEnd" label-width="150px">
          <el-date-picker clearable v-model="queryParams.newTimeEnd" type="date" value-format="yyyy-MM-dd"
            placeholder="商品上架结束">
          </el-date-picker>
        </el-form-item>
        ——
        <el-form-item label="" prop="visionShootingPlanStart" label-width="160px">
          <el-date-picker clearable v-model="queryParams.visionShootingPlanStart" type="date" value-format="yyyy-MM-dd"
            placeholder="摄影-计划拍摄开始">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="" prop="visionShootingPlanEnd" label-width="160px">
          <el-date-picker clearable v-model="queryParams.visionShootingPlanEnd" type="date" value-format="yyyy-MM-dd"
            placeholder="摄影-计划拍摄结束">
          </el-date-picker>
        </el-form-item>
        ——
        <el-form-item label="" prop="visionShootingPlanMarkStart" label-width="160px">
          <el-date-picker clearable v-model="queryParams.visionShootingPlanMarkStart" type="date"
            value-format="yyyy-MM-dd" placeholder="摄影-完成拍摄开始">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="" prop="visionShootingPlanMarkEnd" label-width="160px">
          <el-date-picker clearable v-model="queryParams.visionShootingPlanMarkEnd" type="date" value-format="yyyy-MM-dd"
            placeholder="摄影-完成拍摄结束">
          </el-date-picker>
        </el-form-item>

        ——
        <el-form-item label="" prop="operationPlanTimeStart" label-width="160px">
          <el-date-picker clearable v-model="queryParams.operationPlanTimeStart" type="date" value-format="yyyy-MM-dd"
            placeholder="运营-开始计划上架">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="" prop="operationPlanTimeEnd" label-width="160px">
          <el-date-picker clearable v-model="queryParams.operationPlanTimeEnd" type="date" value-format="yyyy-MM-dd"
            placeholder="运营-结束计划上架">
          </el-date-picker>
        </el-form-item>
        ——
        <el-form-item label="" prop="operationPreviewPlanTimeStart" label-width="160px">
          <el-date-picker clearable v-model="queryParams.operationPreviewPlanTimeStart" type="date"
            value-format="yyyy-MM-dd" placeholder="运营-开始预览架">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="" prop="operationPreviewPlanTimeEnd" label-width="160px">
          <el-date-picker clearable v-model="queryParams.operationPreviewPlanTimeEnd" type="date"
            value-format="yyyy-MM-dd" placeholder="运营-结束预览架">
          </el-date-picker>
        </el-form-item>
        ——
        <el-form-item label="" prop="shippingTimeStart" label-width="160px">
          <el-date-picker clearable v-model="queryParams.shippingTimeStart" type="date" value-format="yyyy-MM-dd"
            placeholder="采购-开始出货">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="" prop="shippingTimeEnd" label-width="160px">
          <el-date-picker clearable v-model="queryParams.shippingTimeEnd" type="date" value-format="yyyy-MM-dd"
            placeholder="采购-结束出货">
          </el-date-picker>
        </el-form-item>

        ——
        <el-form-item label="" prop="orderTimeStart" label-width="160px">
          <el-date-picker clearable v-model="queryParams.orderTimeStart" type="date" value-format="yyyy-MM-dd"
            placeholder="采购-开始下单时间">
          </el-date-picker>
        </el-form-item>

        <el-form-item label="" prop="orderTimeEnd" label-width="160px">
          <el-date-picker clearable v-model="queryParams.orderTimeEnd" type="date" value-format="yyyy-MM-dd"
            placeholder="采购-结束下单时间">
          </el-date-picker>
        </el-form-item>
        ——
        <el-form-item label="" prop="procureRemark">
          <el-input @keyup.enter.native="handleQuery" v-model="queryParams.procureRemark" placeholder="采购备注" clearable />
        </el-form-item>
        <el-form-item label="" prop="firstLevelColumn">
          <el-select v-model="queryParams.firstLevelColumn" placeholder="一级类目" clearable>
            <el-option v-for="dict in dict.type.sys_product_pl" :key="dict.value" :label="dict.label"
              :value="dict.value" />
          </el-select>
        </el-form-item>
        <el-form-item label="" prop="firstLevelExtendedColumn">
          <el-select v-model="queryParams.firstLevelExtendedColumn" placeholder="二级类目" filterable clearable>
            <el-option v-for="dict in dict.type.sys_product_secondary" :key="dict.value" :label="dict.label"
              :value="dict.value" />
          </el-select>
        </el-form-item>
        <el-form-item label="" prop="secondLevelColumn">
          <el-select v-model="queryParams.secondLevelColumn" placeholder="三级类目" filterable clearable>
            <el-option v-for="dict in dict.type.sys_product_cycle" :key="dict.label" :label="dict.label"
              :value="dict.label" />
          </el-select>
        </el-form-item>
        <el-form-item label="" prop="merchandiseBrand">
          <el-select v-model="queryParams.merchandiseBrand" placeholder="品牌信息" clearable>
            <el-option v-for="dict in dict.type.sys_product_pp" :key="dict.value" :label="dict.label"
              :value="dict.value" />
          </el-select>
        </el-form-item>
      </div>

      <!-- <el-row >
                <el-form-item label="" prop="isShippingTime">
                    
                </el-form-item>
            </el-row> -->
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5" style="display: none">
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
          v-hasPermi="['product:new:add']">新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
          v-hasPermi="['product:new:edit']">修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
          v-hasPermi="['product:new:remove']">删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
          v-hasPermi="['product:relation:export']">导出</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportPic"
          v-hasPermi="['product:relation:export']">不导出图片</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button size="mini" plain icon="el-icon-upload" @click="daoru">导入</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button size="mini" plain icon="el-icon-s-comment" @click="chat">通知</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" plain size="mini" @click="openUpload = true">批量修改上架时间</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" plain size="mini" @click="openNewUpload = true">批量修改商品主推款</el-button>
      </el-col>
      <el-col :span="1.5" v-show="isShippingTime">
        <!-- <el-button size="mini" plain icon="el-icon-s-comment" @click="chatNewTime">商品-上架时间</el-button> -->
        <el-radio-group v-model="queryParams.isShippingTime" size="small" fill="#66b1ff" @change="changeShippingTime">
          <el-radio :label="0">未出货</el-radio>
          <el-radio :label="1">已出货</el-radio>
          <el-radio :label="2">取消</el-radio>
          <el-radio :label="null">所有</el-radio>
        </el-radio-group>
      </el-col>
      <!-- <el-col :span="1.5">
                <el-button size="mini" plain icon="el-icon-s-comment" @click="chatgpt">运营-上架时间</el-button>
            </el-col> -->

      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <!-- 添加或修改产品二级信息对话框 :on-change="handleChange"-->
    <el-dialog :visible.sync="openNewUpload" width="500px" append-to-body v-if="openNewUpload">
      <el-form label-width="150px">
        <el-form-item label="导入模板下载" prop="file">
          <el-button size="mini" plain icon="el-icon-download" @click="downNewUpload">批量模板</el-button>
        </el-form-item>
        <el-form-item label="导入文件" prop="file">
          <uploadFile @handleSuccess="getList" :uploadUrl="'/product/relation/updateProNewData'" />
        </el-form-item>
      </el-form>
    </el-dialog>
    <!--tooltip-effect="light" :render-header="renderheader" :header-cell-style="tableRowClassName" class="container" height="calc(100vh - 50px )" border id="bootstrap‐table" @row-dblclick.native="t" v-tableHeight="{ bottomOffset: 0 }"-->

    <div ref="tableDom">
      <u-table :maxHeight="relationList.length ? tableHeight : 'auto'" @row-dblclick="t" v-loading="loading"
        :data="relationList" @selection-change="handleSelectionChange" border id="bootstrap‐table" ref="table"
        :row-style="{ height: '110px' }" use-virtual :row-height="30" :height="700" :data-changes-scroll-top="false"
        :header-cell-style="tableRowClassName" @sort-change="handleSortChange" style="width: 100%"
        @cell-click="tableEdit">
        <u-table-column fixed type="selection" width="55" align="center" />

        <u-table-column :render-header="renderheader" v-if="showColumn.proNewId" fixed width="90px" :label="'采购\n上新记录ID'"
          align="center" prop="proNewId" />
        <u-table-column :render-header="renderheader" v-if="showColumn.merchandiseBrand" fixed width="90px"
          :label="'商品\n品牌信息'" align="center" prop="merchandiseBrand" />
        <u-table-column :render-header="renderheader" v-if="showColumn.productSeason" fixed width="90px" :label="'商品\n季节'"
          align="center" prop="productSeason" />
        <u-table-column v-if="showColumn.productNo" fixed width="110px" :label="'采购\n货号'" align="center" prop="productNo">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">采购</span>
            </div>
            <div @click="chatproductNo">
              <span class="table-heard-filter">货号</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>

          <template slot-scope="scope">
            <span>{{ scope.row.productNo }}</span>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.picUrl" fixed width="110px" :label="'采购\n产品图片'"
          align="center" prop="picUrl">
          <template #default="scope">
            <image-preview :src="scope.row.picUrl" :width="80" :height="80" />
            <!-- <el-popover
              effect="light"
              trigger="click"
              placement="left"
              width="auto"
              v-if="scope.row.picUrl"
            >
              <template #default>
                <img
                  :src="pjtUrl + scope.row.picUrl"
                  style="width: 800px; height: 600px; object-fit: contain"
                  lazy
                />
              </template>
              <template #reference>
                <img
                  :src="pjtUrl + scope.row.picUrl"
                  style="object-fit: contain; width: 80px; height: 80px"
                  lazy
                />
              </template>
            </el-popover> -->
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.colorProperty" fixed :label="'采购\n颜色属性'"
          width="150px" align="center" prop="colorProperty" />
        <u-table-column v-if="showColumn.procureRemark" fixed prop="procureRemark" width="100px" :label="'采购\n备注'"
          align="center">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">采购</span>
            </div>
            <div @click="chatprocureRemark">
              <span class="table-heard-filter">备注</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.procureRemark }}</span> -->
              <el-input v-model="scope.row.procureRemark" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.procureRemark }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>

        <u-table-column v-if="showColumn.operationMainProducts" :label="'商品\n主推款'" align="center"
          prop="operationMainProducts" width="110px">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">商品</span>
            </div>
            <div @click="chatoperationMainProducts">
              <span class="table-heard-filter">主推款</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>

          <template slot-scope="scope">
            <span>{{ scope.row.operationMainProducts }}</span>
          </template>
        </u-table-column>
        <u-table-column v-if="showColumn.operationLevel" :label="'运营\n层级'" align="center" prop="operationLevel"
          width="110px">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">运营</span>
            </div>

            <div @click="chatoperationLevel">
              <span class="table-heard-filter">层级</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>

          <template slot-scope="scope">
            <span>{{ scope.row.operationLevel }}</span>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.operationMainColor" :label="'运营\n主色/辅色'"
          align="center" prop="operationMainColor" />
        <u-table-column :render-header="renderheader" v-if="showColumn.merchandiseSalePrice" :label="'商品\n销售价格'"
          align="center" prop="merchandiseSalePrice" />
        <u-table-column :render-header="renderheader" v-if="showColumn.merchandiseTagPrice" :label="'商品\n吊牌价格'"
          align="center" prop="merchandiseTagPrice" />
        <u-table-column :render-header="renderheader" v-if="showColumn.firstLevelColumn" :label="'商品\n一级类目'"
          align="center" prop="firstLevelColumn" />
        <u-table-column width="140" :render-header="renderheader" v-if="showColumn.firstLevelExtendedColumn"
          :label="'商品\n二级类目'" align="center" prop="firstLevelExtendedColumn" />
        <u-table-column :render-header="renderheader" v-if="showColumn.secondLevelColumn" :label="'商品\n三级类目'"
          align="center" prop="secondLevelColumn" width="200" />

        <u-table-column :render-header="renderheader" v-if="showColumn.proNewSizeList" :label="'采购\n可选尺码'" align="center"
          prop="proNewSizeList" :formatter="formatData" width="180px" />
        <u-table-column :render-header="renderheader" v-if="showColumn.orderNum" :label="'采购\n下单数量'" align="center"
          prop="orderNum" />

        <u-table-column :render-header="renderheader" v-if="showColumn.orderTime" :label="'采购\n确认下单时间'" align="center"
          prop="orderTime" width="100px">
          <template slot-scope="scope">
            <el-date-picker clearable v-model="scope.row.orderTime" type="date" value-format="yyyy-MM-dd"
              placeholder="下单时间" v-if="userInfo == 'purchase' && istxChange === true"
              @change="handleStatusChange(scope.row)" style="width: 135px"></el-date-picker>
            <span v-else>{{
              parseTime(scope.row.orderTime, "{y}-{m}-{d}")
            }}</span>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.manufacturerCode" :label="'采购\n生产厂家'"
          align="center" prop="manufacturerCode" />
        <u-table-column :render-header="renderheader" v-if="showColumn.procureWeavingPeriod" width="100px"
          :label="'采购\n织坯期(天)'" align="center" prop="procureWeavingPeriod" />
        <u-table-column :render-header="renderheader" v-if="showColumn.procureStainPeriod" width="100px"
          :label="'采购\n染色期(天)'" align="center" prop="procureStainPeriod" />
        <!-- <u-table-column :render-header="renderheader" width="130px" :label="'采购\n面料生产周期(天)'" align="center" prop="fabricCycle" /> -->
        <u-table-column :render-header="renderheader" v-if="showColumn.workshopCycle" width="130px"
          :label="'采购\n车间生产周期(天)'" align="center" prop="workshopCycle" />
        <u-table-column v-if="showColumn.shippingTime" :label="'采购\n出货时间'" align="center" prop="shippingTime"
          width="110px">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">采购</span>
            </div>
            <div @click="chatShippingTime">
              <span class="table-heard-filter">出货时间</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>
          <template slot-scope="scope">
            <!-- <span v-if="scope.row.isShippingTime == 'null'">{{ scope.row.shippingTime
                        }}</span> -->
            <strong v-if="scope.row.isShippingTime == '1'" style="color: red">{{
              scope.row.shippingTime
            }}</strong>
            <span v-else-if="scope.row.isShippingTime == '2'" style="color: #ccc">{{ scope.row.shippingTime }}</span>
            <span v-else>{{ scope.row.shippingTime }}</span>
          </template>
        </u-table-column>
        <u-table-column v-if="showColumn.visionShootingPlan" width="130px" :label="'摄影\n计划拍摄时间'" align="center"
          prop="visionShootingPlan">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">摄影</span>
            </div>
            <div @click="chatShootingPlan">
              <span class="table-heard-filter">计划拍摄时间</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>
          <template slot-scope="scope">
            <span>{{
              parseTime(scope.row.visionShootingPlan, "{y}-{m}-{d}")
            }}</span>
          </template>
        </u-table-column>
        <u-table-column v-if="showColumn.visionShootingPlanMark" width="130px" :label="'摄影\n完成拍摄时间'" align="center"
          prop="visionShootingPlanMark">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">摄影</span>
            </div>
            <div @click="chatShootingPlanMark">
              <span class="table-heard-filter">完成拍摄时间</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>
          <template slot-scope="scope">
            <span>{{
              parseTime(scope.row.visionShootingPlanMark, "{y}-{m}-{d}")
            }}</span>
          </template>
        </u-table-column>

        <!-- :render-header="renderheader" -->
        <u-table-column v-if="showColumn.designDesigners" width="130px" :label="'设计\n设计师'" align="center"
          prop="designDesigners">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">设计</span>
            </div>
            <div @click="chatdesignDesigners">
              <span class="table-heard-filter">设计师</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.designSeries" width="100px" :label="'设计\n系列'"
          align="center" prop="designSeries" />
        <u-table-column :render-header="renderheader" v-if="showColumn.mainScene" width="100px" :label="'设计\n主题'"
          align="center" prop="mainScene" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designSpecialCases" width="100px"
          :label="'设计\n样品特殊情况'" align="center" prop="designSpecialCases">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.designRecommendNumber }}</span> -->
              <el-input v-model="scope.row.designSpecialCases" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.designSpecialCases }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.designSpecialCasesPic" width="150px"
          :label="'设计\n样品特殊情况(图片)'" align="center" prop="designSpecialCasesPic">
          <template #default="scope">
            <image-preview :src="scope.row.designSpecialCasesPic" :width="80" :height="80" />
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.designMatchingNumber" width="260px"
          :label="'设计\n搭配(货号)'" align="center" prop="designMatchingNumber">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.designSize }}</span> -->
              <el-input v-model="scope.row.designMatchingNumber" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.designMatchingNumber }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <!-- <u-table-column :render-header="renderheader" width="100px" :label="'设计\n搭配(图片)'" align="center" prop="designMatchingPicture" /> -->
        <u-table-column :render-header="renderheader" v-if="showColumn.designMatchingPicture" width="110px"
          :label="'设计\n搭配(图片)'" align="center" prop="designMatchingPicture">
          <template #default="scope">
            <image-preview :src="scope.row.designMatchingPicture" :width="80" :height="80" />
          </template>
        </u-table-column>
        <!-- <u-table-column :render-header="renderheader" width="100px" :label="'设计\n其他搭配货号'" align="center" prop="designRecommendNumber" /> -->
        <u-table-column :render-header="renderheader" v-if="showColumn.designRecommendNumber" prop="designRecommendNumber"
          width="100px" :label="'设计\n其他搭配货号'" align="center">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.designRecommendNumber }}</span> -->
              <el-input v-model="scope.row.designRecommendNumber" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.designRecommendNumber }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <!-- <u-table-column :render-header="renderheader" v-if="showColumn." width="100px" :label="'设计\n其他搭配图片'" align="center" prop="designRecommendPicture" /> -->
        <u-table-column :render-header="renderheader" v-if="showColumn.designRecommendPicture" width="100px"
          :label="'设计\n其他搭配图片'" align="center" prop="designRecommendPicture">
          <template #default="scope">
            <image-preview :src="scope.row.designRecommendPicture" :width="80" :height="80" />
          </template>
        </u-table-column>

        <u-table-column :render-header="renderheader" v-if="showColumn.designScene" width="100px" :label="'设计\n场景名'"
          align="center" prop="designScene" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designShootingScene" width="300px"
          :label="'设计\n拍摄场景建议'" align="center" prop="designShootingScene">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.designShootingScene }}</span> -->
              <el-input v-model="scope.row.designShootingScene" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.designShootingScene }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>

        <u-table-column v-if="showColumn.designShootingSample" width="250px" :label="'设计\n拍摄样板进度'" align="center"
          prop="designShootingSample">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">设计</span>
            </div>
            <div @click="chatShootingSample">
              <span class="table-heard-filter">拍摄样板进度</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>
          <template slot-scope="scope">
            <el-input v-model="scope.row.designShootingSample" placeholder="拍摄样板进度"
              v-if="userInfo == 'designer' && istxChange === true" @blur="handleStatusChange(scope.row)" />
            <el-popover v-else trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.designShootingScene }}</span> -->
              <el-input v-model="scope.row.designShootingSample" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '50%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.designShootingSample }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <u-table-column v-if="showColumn.designTraining" width="120px" :label="'设计\n培训'" align="center"
          prop="designTraining">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">设计</span>
            </div>
            <div>
              <span class="table-heard-filter">培训</span>
              <!-- <i class="el-icon-caret-bottom"></i> -->
              <!-- oninput="if(isNaN(value)) { value = null } if(value.indexOf('.')>0) 
             {value=value.slice(0,value.indexOf('.')+3)}" -->
            </div>
          </template>
          <template slot-scope="scope">
            <!-- <el-switch v-model="scope.row.designTraining" :active-value="'已培训'" :inactive-value="'未培训'"
                            active-color="#13ce66" inactive-color="#ff4949" @change="handleStatusChange(scope.row)"
                            v-if="userInfo == 'designer' | userInfo == 'design' | userInfo == 'designAll' && istxChange === true">
                        </el-switch> -->
            <!-- <el-select v-model="scope.row.designTraining" placeholder="请选择培训状态" clearable filterable
                            v-if="scope.row[scope.column.property + 'isShow']" :ref="scope.column.property"
                            @blur="alterData(scope.row, scope.column)">-->
            <el-select v-model="scope.row.designTraining" placeholder="请选择培训状态" clearable filterable
              @change="handleStatusChange(scope.row)" v-if="(userInfo == 'designer') |
                (userInfo == 'design') |
                (userInfo == 'designAll') |
                (userInfo == 'admin') && istxChange === true
                ">
              <el-option v-for="dict in dict.type.sys_one_designtraining" :key="dict.value" :label="dict.label"
                :value="dict.value" />
            </el-select>
            <!-- <el-input v-if="scope.row[scope.column.property + 'isShow']" :ref="scope.column.property"
                            v-model="scope.row.designTraining" @blur="alterData(scope.row, scope.column)"></el-input> -->
            <span v-else>{{ scope.row.designTraining }}</span>
          </template>
        </u-table-column>
        <!-- <u-table-column :render-header="renderheader" v-if="showColumn.designTraining" width="120px"
                    :label="'设计\n培训操作'" align="center" prop="designTraining">
                    <template slot-scope="scope" align="center">
                        <el-button style="padding: 3px 0" type="button"
                            @click="view(scope.$index, scope.row, '未培训')">未培</el-button>
                        <el-button style="padding: 3px 0" type="button"
                            @click="view(scope.$index, scope.row, '已培训')">已培</el-button>
                    </template>

                </u-table-column> -->

        <u-table-column :render-header="renderheader" v-if="showColumn.logoUrl" :label="'采购\nlogo图片'" align="center"
          prop="logoUrl" width="110px">
          <template #default="scope">
            <image-preview :src="scope.row.logoUrl" :width="80" :height="80" />
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.logoPosition" :label="'采购\nlogo位置'" align="center"
          prop="logoPosition" width="110px">
          <template #default="scope">
            <image-preview :src="scope.row.logoPosition" :width="80" :height="80" />
          </template>
        </u-table-column>
        <!-- <u-table-column :render-header="renderheader" width="100px" :label="'采购\n面料成分'" align="center" prop="fabricComposition" /> -->
        <u-table-column :render-header="renderheader" v-if="showColumn.fabricComposition" prop="fabricComposition"
          width="250px" :label="'采购\n面料成分'" align="center">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.fabricComposition }}</span> -->
              <el-input v-model="scope.row.fabricComposition" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.fabricComposition }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.designFabricFunction" width="200"
          :label="'采购\n面料功能'" align="center" prop="designFabricFunction">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.fabricComposition }}</span> -->
              <el-input v-model="scope.row.designFabricFunction" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.designFabricFunction }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <u-table-column v-if="showColumn.designFabricName" :label="'采购\n主面料名称'" align="center" prop="designFabricName"
          width="250px">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">采购</span>
            </div>
            <div @click="chatdesignFabricName">
              <span class="table-heard-filter">主面料名称</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>
        </u-table-column>
        <!-- <u-table-column :render-header="renderheader" v-if="showColumn.designProductCategories" width="100px"
                    :label="'设计\n产品分类'" align="center" prop="designProductCategories" /> -->
        <u-table-column :render-header="renderheader" v-if="showColumn.designChestPad" width="100px" :label="'设计\n胸垫/裤裆'"
          align="center" prop="designChestPad" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designShockproofDegree" width="180px"
          :label="'设计\n防震程度/腰高'" align="center" prop="designShockproofDegree" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designGatheringDegree" width="100px"
          :label="'设计\n聚拢程度'" align="center" prop="designGatheringDegree" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designLiningMaterial" width="100px"
          :label="'设计\n里料材质'" align="center" prop="designLiningMaterial" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designRecommendedSizes" width="100px"
          :label="'设计\n建议尺码'" align="center" prop="designRecommendedSizes" />
        <!-- <u-table-column :render-header="renderheader" width="100px" :label="'设计\n尺码'" align="center" prop="designSize" /> -->
        <u-table-column v-if="showColumn.designSize" prop="designSize" width="100px" :label="'设计\n尺码'" align="center">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">设计</span>
            </div>
            <div @click="chatDesignSize">
              <span class="table-heard-filter">尺码</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>

          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.designSize }}</span> -->
              <el-input v-model="scope.row.designSize" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.designSize }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.designSpecialFabric" width="100px"
          :label="'设计\n特殊面料信息'" align="center" prop="designSpecialFabric">
          <template slot-scope="scope">
            <mypopover :popoverInput="scope.row.designSpecialFabric" />
          </template>
        </u-table-column>
        <!-- <u-table-column :render-header="renderheader" width="100px" :label="'设计\n特别呈现卖点'" align="center" prop="designSpecialPresentation" /> -->
        <u-table-column :render-header="renderheader" v-if="showColumn.designSpecialPresentation"
          prop="designSpecialPresentation" width="100px" :label="'设计\n特别呈现卖点'" align="center">
          <template slot-scope="scope">
            <mypopover :popoverInput="scope.row.designSpecialPresentation" />
          </template>
        </u-table-column>
        <!-- <u-table-column :render-header="renderheader" show-overflow-tooltip width="200px" :label="'文案\n精细化详情页'" align="center"
                prop="copywritingDetailPage" /> -->
        <u-table-column :render-header="renderheader" v-if="showColumn.copywritingDetailPage" prop="copywritingDetailPage"
          width="100px" :label="'文案\n精细化详情页'" align="center">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.copywritingDetailPage }}</span> -->
              <el-input v-model="scope.row.copywritingDetailPage" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.copywritingDetailPage }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>

        <!-- <u-table-column :render-header="renderheader" width="100px" :label="'文案\n功能展示'" align="center" prop="copywritingFunctionDisplay" /> -->
        <u-table-column :render-header="renderheader" v-if="showColumn.copywritingFunctionDisplay"
          prop="copywritingFunctionDisplay" width="100px" :label="'文案\n功能展示'" align="center">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.copywritingFunctionDisplay }}</span> -->
              <el-input v-model="scope.row.copywritingFunctionDisplay" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.copywritingFunctionDisplay }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <!-- <u-table-column :render-header="renderheader" width="100px" :label="'文案\n细节展示'" align="center" prop="copywritingDetailShow" /> -->
        <u-table-column :render-header="renderheader" v-if="showColumn.copywritingDetailShow" prop="copywritingDetailShow"
          width="100px" :label="'文案\n细节展示'" align="center">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.copywritingDetailShow }}</span> -->
              <el-input v-model="scope.row.copywritingDetailShow" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.copywritingDetailShow }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <!-- <u-table-column :render-header="renderheader" width="100px" :label="'文案\n设计原理'" align="center" prop="copywritingDesignPrinciple" /> -->
        <u-table-column :render-header="renderheader" v-if="showColumn.copywritingDesignPrinciple"
          prop="copywritingDesignPrinciple" width="100px" :label="'文案\n设计原理'" align="center">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.copywritingDesignPrinciple }}</span> -->
              <el-input v-model="scope.row.copywritingDesignPrinciple" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.copywritingDesignPrinciple }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <!-- <u-table-column :render-header="renderheader" width="100px" :label="'文案\n海报文案'" align="center" prop="copywritingPosterCopy" /> -->
        <u-table-column :render-header="renderheader" v-if="showColumn.copywritingPosterCopy" prop="copywritingPosterCopy"
          width="100px" :label="'文案\n海报文案'" align="center">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.copywritingPosterCopy }}</span> -->
              <el-input v-model="scope.row.copywritingPosterCopy" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.copywritingPosterCopy }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <!-- <u-table-column :render-header="renderheader" v-if="showColumn." width="100px" :label="'运营\n主图卖点提炼'" align="center" prop="operationMainSelling" /> -->
        <u-table-column :render-header="renderheader" v-if="showColumn.operationMainSelling" prop="operationMainSelling"
          width="120px" :label="'运营\n主图卖点提炼'" align="center">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.operationMainSelling }}</span> -->
              <el-input v-model="scope.row.operationMainSelling" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.operationMainSelling }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <!-- <u-table-column :render-header="renderheader" width="120px" :label="'文案\n精细化主图卖点'" align="center" prop="copywritingMainSelling" /> -->

        <u-table-column :render-header="renderheader" v-if="showColumn.copywritingMainSelling"
          prop="copywritingMainSelling" width="120px" :label="'文案\n精细化主图卖点'" align="center">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.copywritingMainSelling }}</span> -->
              <el-input v-model="scope.row.copywritingMainSelling" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.copywritingMainSelling }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <!-- <u-table-column :render-header="renderheader" width="100px" :label="'文案\n视频文案'" align="center" prop="copywritingVideo" /> -->
        <u-table-column :render-header="renderheader" v-if="showColumn.copywritingVideo" prop="copywritingVideo"
          width="100px" :label="'文案\n视频文案'" align="center">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <el-input v-model="scope.row.copywritingVideo" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <!-- <span>{{ scope.row.copywritingVideo }}</span> -->
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.copywritingVideo }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.copywritingFamily" width="100px"
          :label="'文案\n家族分类'" align="center" prop="copywritingFamily" />
        <u-table-column :render-header="renderheader" v-if="showColumn.copywritingFabricName" width="250px"
          :label="'文案\n面料昵称'" align="center" prop="copywritingFabricName" />
        <u-table-column :render-header="renderheader" v-if="showColumn.copywritingNickname" width="100px"
          :label="'文案\n小别名'" align="center" prop="copywritingNickname"></u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.photographyPlane" width="100px"
          :label="'摄影\n是否拍摄平面'" align="center" prop="photographyPlane">
          <template slot-scope="scope">
            <el-switch v-model="scope.row.photographyPlane" :active-value="'1'" :inactive-value="'0'"
              active-color="#13ce66" inactive-color="#ff4949" @change="handleStatusChange(scope.row)"
              v-if="userInfo == 'shot' && istxChange === true">
            </el-switch>
            <span v-else>
              <dict-tag :options="dict.type.sys_one_zero" :value="scope.row.photographyPlane" />
            </span>
            <!-- <dict-tag :options="dict.type.sys_one_zero" :value="scope.row.photographyPlane" /> -->
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.photographyVideo" width="100px"
          :label="'摄影\n是否拍摄视频'" align="center" prop="photographyVideo">
          <template slot-scope="scope">
            <el-switch v-model="scope.row.photographyVideo" :active-value="'1'" :inactive-value="'0'"
              active-color="#13ce66" inactive-color="#ff4949" @change="handleStatusChange(scope.row)"
              v-if="userInfo == 'shot' && istxChange === true">
            </el-switch>
            <span v-else>
              <dict-tag :options="dict.type.sys_one_zero" :value="scope.row.photographyVideo" />
            </span>
            <!-- <dict-tag :options="dict.type.sys_one_zero" :value="scope.row.photographyVideo" /> -->
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.visionShooting3d" width="130px"
          :label="'视觉\n是否拍3D图、细节'" align="center" prop="visionShooting3d">
          <template slot-scope="scope">
            <el-switch v-model="scope.row.visionShooting3d" :active-value="'1'" :inactive-value="'0'"
              active-color="#13ce66" inactive-color="#ff4949" @change="handleStatusChange(scope.row)"
              v-if="userInfo == 'vision' && istxChange === true">
            </el-switch>
            <span v-else>
              <dict-tag :options="dict.type.sys_one_zero" :value="scope.row.visionShooting3d" />
            </span>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.visionRetouchingProgress" width="100px"
          :label="'视觉\n修图进度'" align="center" prop="visionRetouchingProgress" />

        <u-table-column :render-header="renderheader" v-if="showColumn.photographyVideoEditing" width="100px"
          :label="'摄影\n视频剪辑进度'" align="center" prop="photographyVideoEditing" />
        <!-- <u-table-column :render-header="renderheader" width="100px" :label="'商品\n计划上架时间'" align="center" prop="merchandisePlanTime">
                <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.merchandisePlanTime, '{y}-{m}-{d}') }}</span>
                </template>
            </u-table-column> -->
        <u-table-column v-if="showColumn.newTime" :label="'商品\n上架时间'" align="center" prop="newTime" width="110px">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">商品</span>
            </div>
            <div @click="chatNewTime">
              <span class="table-heard-filter">上架时间</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>

          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.newTime, "{y}-{m}-{d}") }}</span>
          </template>
        </u-table-column>
        <!-- :render-header="renderheader" -->
        <u-table-column v-if="showColumn.newTimeMark" width="130px" :label="'商品\n上架时间备注'" align="center"
          prop="newTimeMark">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">商品</span>
            </div>
            <div @click="chatNewTimeMark">
              <span class="table-heard-filter">上架时间备注</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>

          <template slot-scope="scope">
            <span>{{ scope.row.newTimeMark }}</span>
          </template>
        </u-table-column>

        <!-- :render-header="renderheader"  :formatter="formatDatanewChannel"-->
        <u-table-column v-if="showColumn.channelList" width="250px" align="center" :label="'商品\n上新渠道'">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">商品</span>
            </div>
            <div @click="chatnewChannel">
              <span class="table-heard-filter">上新渠道</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>

          <template slot-scope="scope">
            {{ scope.row.newChannel }}
          </template>
        </u-table-column>
        <u-table-column v-if="showColumn.operationPlanTime" :label="'运营\n计划上架时间'" align="center" prop="operationPlanTime"
          width="160">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">运营</span>
            </div>
            <div @click="chatoperationPlanTime">
              <span class="table-heard-filter">计划上架时间</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>

          <template slot-scope="scope">
            <el-date-picker clearable v-model="scope.row.operationPlanTime" type="date" value-format="yyyy-MM-dd"
              placeholder="计划时间" v-if="(userInfo == 'operate') | (userInfo == 'copywriting') &&
                istxChange === true
                " @change="handleStatusChange(scope.row)" style="width: 135px"></el-date-picker>
            <span v-else>{{
              parseTime(scope.row.operationPlanTime, "{y}-{m}-{d}")
            }}</span>
          </template>
        </u-table-column>

        <u-table-column v-if="showColumn.operationalRemarks" width="130px" :label="'运营\n备注'" align="center"
          prop="operationalRemarks">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">运营</span>
            </div>
            <div @click="chatoperationalRemarks">
              <span class="table-heard-filter">备注</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>

          <template slot-scope="scope">
            <el-input v-model="scope.row.operationalRemarks" placeholder="运营-备注" v-if="(userInfo == 'operate') | (userInfo == 'copywriting') &&
              istxChange === true
              " @blur="handleStatusChange(scope.row)" />
            <!--  @keyup.enter.native="handleStatusChange(scope.row, $event)" -->
            <span v-else>{{ scope.row.operationalRemarks }}</span>
          </template>
        </u-table-column>
        <!-- <u-table-column
          v-if="showColumn.operationPlanTime"
          width="160"
          :label="'运营\n计划上架时间'"
          align="center"
          prop="operationPlanTime"
          sortable="custom"
        >
          <template slot-scope="scope">
            <span>{{
              parseTime(scope.row.operationPlanTime, "{y}-{m}-{d}")
            }}</span>
          </template>
        </u-table-column> -->
        <!-- <u-table-column :render-header="renderheader" v-if="showColumn.operationPlanTime" width="150"
                    :label="'运营\n计划上架时间'" align="center" prop="operationPlanTime">
                    <template v-slot:header>
                        <div>
                            <span class="table-heard-filter"></span>
                            <i class="el-icon-caret-bottom"></i>
                        </div>
                    </template>
                </u-table-column> -->
        <!-- :render-header="renderheader" -->
        <u-table-column v-if="showColumn.operationPreviewPlanTime" width="160" :label="'运营\n预览时间'" align="center"
          prop="operationPreviewPlanTime">
          <template v-slot:header>
            <div>
              <span class="table-heard-filter">运营</span>
            </div>
            <div @click="chatoperationPreviewPlanTime">
              <span class="table-heard-filter">预览时间</span>
              <i class="el-icon-caret-bottom"></i>
            </div>
          </template>
          <template slot-scope="scope">
            <el-date-picker clearable v-model="scope.row.operationPreviewPlanTime" type="date" value-format="yyyy-MM-dd"
              placeholder="预览时间" v-if="(userInfo == 'operate') | (userInfo == 'copywriting') &&
                istxChange === true
                " @change="handleStatusChange(scope.row)" style="width: 135px"></el-date-picker>
            <span v-else>{{
              parseTime(scope.row.operationPreviewPlanTime, "{y}-{m}-{d}")
            }}</span>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.operationJingdongUploaded" width="120px"
          :label="'运营\n京东-是否上架'" align="center" prop="operationJingdongUploaded">
          <template slot-scope="scope">
            <el-switch v-model="scope.row.operationJingdongUploaded" :active-value="1" :inactive-value="0"
              active-color="#13ce66" inactive-color="#ff4949" v-if="userInfo == 'operate' && istxChange === true"
              @change="handleStatusChange(scope.row)">
            </el-switch>
            <dict-tag v-else :options="dict.type.sys_one_zero" :value="scope.row.operationJingdongUploaded" />
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.operationJingdongMain" width="100px"
          :label="'运营\n京东-主推款'" align="center" prop="operationJingdongMain" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designPropertyCategory" width="140px"
          :label="'设计\n属性类别/商品描述'" align="center" prop="designPropertyCategory" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designFitCup" width="100px" :label="'设计\n版型/罩杯'"
          align="center" prop="designFitCup" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designSuitableBody" width="100px"
          :label="'设计\n适合体型'" align="center" prop="designSuitableBody">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.fabricComposition }}</span> -->
              <el-input v-model="scope.row.designSuitableBody" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.designSuitableBody }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.designGarmentTrouser" width="100px"
          :label="'设计\n衣长/裤长'" align="center" prop="designGarmentTrouser" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designExerciseIntensity" width="100px"
          :label="'设计\n运动强度'" align="center" prop="designExerciseIntensity" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designFlexibility" width="100px" :label="'设计\n弹性'"
          align="center" prop="designFlexibility" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designFitnessLevels" width="100px"
          :label="'设计\n健身层级'" align="center" prop="designFitnessLevels" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designSomatosensory" width="100px"
          :label="'设计\n体感'" align="center" prop="designSomatosensory" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designSoftness" width="100px" :label="'设计\n柔软度'"
          align="center" prop="designSoftness" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designFabricThickness" width="100px"
          :label="'设计\n面料厚度'" align="center" prop="designFabricThickness" />
        <u-table-column :render-header="renderheader" v-if="showColumn.designBreathability" width="100px"
          :label="'设计\n透气度'" align="center" prop="designBreathability" />

        <u-table-column :render-header="renderheader" v-if="showColumn.purchasingAccessoriesMark"
          prop="purchasingAccessoriesMark" width="100px" :label="'采购\n修改备注说明'" align="center">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.purchasingAccessoriesMark }}</span> -->
              <el-input v-model="scope.row.purchasingAccessoriesMark" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.purchasingAccessoriesMark }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.purchasingBeforePicurl" width="120px"
          :label="'采购\n辅料修改前图片'" align="center" prop="purchasingBeforePicurl">
          <template #default="scope">
            <image-preview :src="scope.row.purchasingBeforePicurl" :width="80" :height="80" />
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.purchasingAfterPicurl" width="120px"
          :label="'采购\n辅料修改后图片'" align="center" prop="purchasingAfterPicurl">
          <template #default="scope">
            <image-preview :src="scope.row.purchasingAfterPicurl" :width="80" :height="80" />
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.visionPic" width="110px" :label="'视觉\n图片路径'"
          align="center" prop="visionPic">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.designShootingScene }}</span> -->
              <el-input v-model="scope.row.visionPic" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.visionPic }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.operationChannlLink" width="100px"
          :label="'运营\n渠道链接'" align="center" prop="designShootingScene">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.designShootingScene }}</span> -->
              <el-input v-model="scope.row.operationChannlLink" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">
                  {{ scope.row.operationChannlLink }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.purchasingReportAttachments" :label="'采购\n成衣检测报告'"
          align="center" prop="purchasingReportAttachments" width="120">
          <!-- <template slot-scope="scope">
                        <el-button size="mini" @click="downLoadFile(scope.row.purchasingReportAttachments)"
                            v-if="scope.row.purchasingReportAttachments">
                            下载
                        </el-button>
                        
                    </template> -->
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.customerProductTalking }}</span> -->
              <el-input v-model="scope.row.purchasingReportAttachments" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">{{ scope.row.purchasingReportAttachments }}
                </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>
        <u-table-column :render-header="renderheader" v-if="showColumn.fabricTestRepor" width="100px"
          :label="'采购\n面料检测报告'" align="center" prop="fabricTestRepor">
          <template slot-scope="scope">
            <el-popover trigger="click" placement="bottom" width="300">
              <!-- <span>{{ scope.row.customerProductTalking }}</span> -->
              <el-input v-model="scope.row.fabricTestRepor" :min-height="192" type="textarea"
                :autosize="{ minRows: 2, maxRows: 24 }" :style="{ width: '100%' }" :disabled="true" />
              <div slot="reference">
                <span class="textname">{{ scope.row.fabricTestRepor }} </span>
              </div>
            </el-popover>
          </template>
        </u-table-column>

        <u-table-column label="操作" align="center" class-name="small-padding" fixed="right">
          <template slot="header">
            <i class="el-icon-setting" style="font-size: 22px; cursor: pointer" @click="showColumnOption"></i>
          </template>
          <template slot-scope="scope">
            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
              v-hasPermi="['product:relation:edit']">修改</el-button>
            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
              v-hasPermi="['product:relation:remove']">删除</el-button>
          </template>
        </u-table-column>
        <!-- </el-table> -->
      </u-table>
    </div>

    <pagination v-if="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
    <!-- .splice(10) -->

    <!-- 添加或修改产品二级信息对话框 :filter-node-method="filterNode" ref="tree" node-key="id" @node-click="handleNodeClick"-->
    <el-dialog title="设计-尺码" :visible.sync="opendesignSize" width="300px" append-to-body v-if="opendesignSize">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <div class="head-container">
            <el-form>
              <el-form-item label="未上架">
                <el-checkbox @change="handleCheckeddesignSize($event)">全选</el-checkbox>
                <el-tree show-checkbox :data="designSizeList" border size="medium" @check="handleDesignSize"
                  empty-text="加载中，请稍候"></el-tree>
                <!-- :props="defaultProps" -->
                <!-- <el-tree :data="designShootingSampleList" @check="handleShootingSample" default-expand-all
                            highlight-current show-checkbox /> -->
              </el-form-item>
            </el-form>
          </div>
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitDesignSize">确 定</el-button>
        <el-button @click="cancelDesignSize">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 添加或修改产品二级信息对话框 :filter-node-method="filterNode" ref="tree" node-key="id" @node-click="handleNodeClick"-->
    <el-dialog title="商品-上架时间备注" :visible.sync="opennewTimeMark" width="300px" append-to-body v-if="opennewTimeMark">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <div class="head-container">
            <el-form>
              <el-form-item label="菜单权限">
                <el-checkbox v-model="menuNodeAll"
                  @change="handleCheckedTreeNodeAll($event, 'newTimeMark')">全选/全不选</el-checkbox>
                <!-- <el-checkbox @change="handleCheckeddesignSize($event)"
                  >全选</el-checkbox
                > -->
                <el-tree show-checkbox :data="newTimeMarkList" border size="medium" ref="newTimeMark" node-key="id"
                  empty-text="加载中，请稍候"></el-tree>
                <!-- @check="handlenewTimeMark" :props="defaultProps" -->
                <!-- <el-tree :data="designShootingSampleList" @check="handleShootingSample" default-expand-all
                            highlight-current show-checkbox /> -->
              </el-form-item>
            </el-form>
          </div>
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitnewTimeMark">确 定</el-button>
        <el-button @click="cancelnewTimeMark">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 添加或修改产品二级信息对话框 :filter-node-method="filterNode" ref="tree" node-key="id" @node-click="handleNodeClick"-->
    <el-dialog title="运营-备注" :visible.sync="openoperationalRemarks" width="300px" append-to-body
      v-if="openoperationalRemarks">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <div class="head-container">
            <el-form>
              <el-form-item label="菜单权限">
                <el-checkbox v-model="menuNodeAll" @change="
                  handleCheckedTreeNodeAll($event, 'operationalRemarks')
                  ">全选/全不选</el-checkbox>
                <!-- <el-checkbox @change="handleCheckeddesignSize($event)"
                  >全选</el-checkbox
                > -->
                <el-tree show-checkbox :data="operationalRemarksList" border size="medium" ref="operationalRemarks"
                  node-key="id" empty-text="加载中，请稍候"></el-tree>
                <!-- @check="handlenewTimeMark" :props="defaultProps" -->
                <!-- <el-tree :data="designShootingSampleList" @check="handleShootingSample" default-expand-all
                            highlight-current show-checkbox /> -->
              </el-form-item>
            </el-form>
          </div>
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitoperationalRemarks">确 定</el-button>
        <el-button @click="canceloperationalRemarks">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 添加或修改产品二级信息对话框 :filter-node-method="filterNode" ref="tree" node-key="id" @node-click="handleNodeClick"-->
    <el-dialog title="设计-设计师" :visible.sync="opendesignDesigners" width="300px" append-to-body v-if="opendesignDesigners">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <div class="head-container">
            <el-form>
              <el-form-item label="菜单权限">
                <el-checkbox v-model="menuNodeAll"
                  @change="handleCheckedTreeNodeAll($event, 'designDesigners')">全选/全不选</el-checkbox>
                <!-- <el-checkbox @change="handleCheckeddesignSize($event)"
                  >全选</el-checkbox
                > -->
                <el-tree show-checkbox :data="designDesignersList" border size="medium" ref="designDesigners"
                  node-key="id" empty-text="加载中，请稍候"></el-tree>
                <!-- @check="handlenewTimeMark" :props="defaultProps" -->
                <!-- <el-tree :data="designShootingSampleList" @check="handleShootingSample" default-expand-all
                            highlight-current show-checkbox /> -->
              </el-form-item>
            </el-form>
          </div>
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitdesignDesigners">确 定</el-button>
        <el-button @click="canceldesignDesigners">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 添加或修改产品二级信息对话框 :filter-node-method="filterNode" ref="tree" node-key="id" @node-click="handleNodeClick"-->
    <el-dialog title="采购-货号" :visible.sync="openproductNo" width="300px" append-to-body v-if="openproductNo">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <el-form>
            <el-form-item>
              <el-input v-model="productNo" placeholder="请输入货号" clearable size="small" prefix-icon="el-icon-search" />
            </el-form-item>
            <el-form-item label="菜单权限">
              <!-- <el-checkbox @change="handleCheckeddesignSize($event)"
                  >全选</el-checkbox
                > -->
              <el-checkbox v-model="menuNodeAll"
                @change="handleCheckedTreeNodeAll($event, 'productNo')">全选/全不选</el-checkbox>
              <div class="el-dialog-div">
                <el-tree show-checkbox :data="productNoList" border size="medium" ref="productNo"
                  :filter-node-method="filterNode" node-key="id" empty-text="加载中，请稍候"></el-tree>
              </div>
              <!--@check="handleproductNo" :props="defaultProps" -->
              <!-- <el-tree :data="designShootingSampleList" @check="handleShootingSample" default-expand-all
                            highlight-current show-checkbox /> -->
            </el-form-item>
          </el-form>
          <!-- </div> -->
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitproductNo">确 定</el-button>
        <el-button @click="cancelproductNo">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog title="采购-备注" :visible.sync="openprocureRemark" width="400px" append-to-body v-if="openprocureRemark">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <el-form>
            <el-form-item>
              <el-input v-model="procureRemark" placeholder="请输入采购-备注" clearable size="small"
                prefix-icon="el-icon-search" />
            </el-form-item>
            <el-form-item label="菜单权限">
              <el-checkbox v-model="menuNodeAll"
                @change="handleCheckedTreeNodeAll($event, 'procureRemark')">全选/全不选</el-checkbox>
              <div class="head-container el-dialog-div">
                <el-tree show-checkbox ref="procureRemark" :data="procureRemarkList" border size="medium"
                  empty-text="加载中，请稍候" :filter-node-method="filterNode" node-key="id"></el-tree>
              </div>
            </el-form-item>
          </el-form>
          <!-- </div> -->
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitprocureRemark">确 定</el-button>
        <el-button @click="cancelprocureRemark">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog title="商品-上新渠道" :visible.sync="opennewChannel" width="400px" append-to-body v-if="opennewChannel">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <el-form>
            <el-form-item label="菜单权限">
              <el-checkbox v-model="menuNodeAll"
                @change="handleCheckedTreeNodeAll($event, 'newChannel')">全选/全不选</el-checkbox>
              <div class="head-container el-dialog-div">
                <el-tree show-checkbox ref="newChannel" :data="newChannelList" border size="medium" empty-text="加载中，请稍候"
                  node-key="id"></el-tree>
              </div>
            </el-form-item>
          </el-form>
          <!-- </div> -->
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitnewChannel">确 定</el-button>
        <el-button @click="cancelnewChannel">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog title="商品-主推款" :visible.sync="openoperationMainProducts" width="400px" append-to-body
      v-if="openoperationMainProducts">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <el-form>
            <el-form-item label="菜单权限">
              <el-checkbox v-model="menuNodeAll" @change="
                handleCheckedTreeNodeAll($event, 'operationMainProducts')
                ">全选/全不选</el-checkbox>
              <div class="head-container el-dialog-div">
                <el-tree show-checkbox ref="operationMainProducts" :data="operationMainProductsList" border size="medium"
                  empty-text="加载中，请稍候" node-key="id"></el-tree>
              </div>
              <!--@check="handleShootingSample" :props="defaultProps" -->
              <!-- <el-tree :data="designShootingSampleList" @check="handleShootingSample" default-expand-all
                            highlight-current show-checkbox /> -->
            </el-form-item>
          </el-form>
          <!-- </div> -->
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitoperationMainProducts">确 定</el-button>
        <el-button @click="canceloperationMainProducts">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog title="运营-层级" :visible.sync="openoperationLevel" width="400px" append-to-body v-if="openoperationLevel">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <el-form>
            <el-form-item label="菜单权限">
              <el-checkbox v-model="menuNodeAll"
                @change="handleCheckedTreeNodeAll($event, 'operationLevel')">全选/全不选</el-checkbox>
              <div class="head-container el-dialog-div">
                <el-tree show-checkbox ref="operationLevel" :data="operationLevelList" border size="medium"
                  empty-text="加载中，请稍候" node-key="id"></el-tree>
              </div>
            </el-form-item>
          </el-form>
          <!-- </div> -->
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitoperationLevel">确 定</el-button>
        <el-button @click="canceloperationLevel">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog title="采购-主面料名称" :visible.sync="opendesignFabricName" width="400px" append-to-body
      v-if="opendesignFabricName">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <el-form>
            <el-form-item label="菜单权限">
              <el-checkbox v-model="menuNodeAll"
                @change="handleCheckedTreeNodeAll($event, 'designFabricName')">全选/全不选</el-checkbox>
              <div class="head-container el-dialog-div">
                <el-tree show-checkbox ref="designFabricName" :data="designFabricNameList" border size="medium"
                  empty-text="加载中，请稍候" node-key="id"></el-tree>
              </div>
              <!--@check="handleShootingSample" :props="defaultProps" -->
              <!-- <el-tree :data="designShootingSampleList" @check="handleShootingSample" default-expand-all
                            highlight-current show-checkbox /> -->
            </el-form-item>
          </el-form>
          <!-- </div> -->
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitdesignFabricName">确 定</el-button>
        <el-button @click="canceldesignFabricName">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog title="设计-拍摄样板进度" :visible.sync="openShootingSample" width="300px" append-to-body
      v-if="openShootingSample">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <el-form>
            <el-form-item label="菜单权限">
              <el-checkbox v-model="menuNodeAll" @change="
                handleCheckedTreeNodeAll($event, 'designShootingSample')
                ">全选/全不选</el-checkbox>
              <div class="head-container el-dialog-div">
                <el-tree show-checkbox ref="designShootingSample" :data="designShootingSampleList" border size="medium"
                  empty-text="加载中，请稍候" node-key="id"></el-tree>
              </div>
              <!--@check="handleShootingSample" :props="defaultProps" -->
              <!-- <el-tree :data="designShootingSampleList" @check="handleShootingSample" default-expand-all
                            highlight-current show-checkbox /> -->
            </el-form-item>
          </el-form>
          <!-- </div> -->
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitShootingSample">确 定</el-button>
        <el-button @click="cancelShootingSample">取 消</el-button>
      </div>
    </el-dialog>

    <!-- @check="handleShippingTime" -->

    <el-dialog title="采购-出货时间" :visible.sync="openShippingTime" width="300px" append-to-body v-if="openShippingTime">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <div class="head-container el-dialog-div">
            <el-tree ref="shippingTime" :data="visionShippingTime" :props="defaultProps" :expand-on-click-node="false"
              highlight-current show-checkbox node-key="index" @check="handleShippingTime" />
          </div>
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitShippingTime">确 定</el-button>
        <el-button @click="cancelShippingTime">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog title="商品-上架时间" :visible.sync="openNewTime" width="300px" append-to-body v-if="openNewTime">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <div class="head-container el-dialog-div">
            <el-tree ref="newTime" node-key="index" :data="visionNewTime" :props="defaultProps"
              :expand-on-click-node="false" @check="handleNewTime" highlight-current show-checkbox />
          </div>
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitNewTime">确 定</el-button>
        <el-button @click="cancelNewTime">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog title="运营-计划上架时间" :visible.sync="openoperationPlanTime" width="300px" append-to-body
      v-if="openoperationPlanTime">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <div class="head-container el-dialog-div">
            <el-tree ref="operationPlanTime" node-key="index" :data="visionoperationPlanTime" :props="defaultProps"
              :expand-on-click-node="false" @check="handleoperationPlanTime" highlight-current show-checkbox />
          </div>
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitoperationPlanTime">确 定</el-button>
        <el-button @click="canceloperationPlanTime">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog title="运营-预览时间" :visible.sync="openoperationPreviewPlanTime" width="300px" append-to-body
      v-if="openoperationPreviewPlanTime">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <div class="head-container el-dialog-div">
            <el-tree ref="operationPreviewPlanTime" node-key="index" :data="visionoperationPreviewPlanTime"
              :props="defaultProps" :expand-on-click-node="false" @check="handleoperationPreviewPlanTime"
              highlight-current show-checkbox />
          </div>
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitoperationPreviewPlanTime">确 定</el-button>
        <el-button @click="canceloperationPreviewPlanTime">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog title="摄影-计划拍摄时间 " :visible.sync="openShootingPlan" width="300px" append-to-body v-if="openShootingPlan">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <div class="head-container el-dialog-div">
            <el-tree ref="visionShootingPlan" node-key="index" :data="visionShootingPlan" :props="defaultProps"
              :expand-on-click-node="false" @check="handleShootingPlan" highlight-current show-checkbox />
          </div>
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitShootingPlan">确 定</el-button>
        <el-button @click="cancelShootingPlan">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog title="摄影-完成拍摄时间 " :visible.sync="openShootingPlanMark" width="300px" append-to-body
      v-if="openShootingPlanMark">
      <el-row :gutter="20">
        <el-col :span="24" :xs="24">
          <div class="head-container el-dialog-div">
            <el-tree ref="visionShootingPlanMark" node-key="index" :data="visionShootingPlanMark" :props="defaultProps"
              :expand-on-click-node="false" @check="handleShootingPlanMark" highlight-current show-checkbox />
          </div>
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submitShootingPlanMark">确 定</el-button>
        <el-button @click="cancelShootingPlanMark">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog :visible.sync="isVisible" width="1500px" append-to-body title="发送通知" V-if="isVisible">
      <component :is="'chatsend'" :chatlist="list" @dialogBeforeClose="dialogBeforeClose"></component>
      <!--
        :before-close="dialogBeforeClose"
        
        <el-row>
        <el-col :span="8" class="left">
          <el-tree
            class="tree-border"
            show-checkbox
            :data="deptOptions"
            border
            size="medium"
            @node-click="handleNodeClick"
            @check="handleContentCheck"
            empty-text="加载中，请稍候"
          ></el-tree>
        </el-col>
        <el-col :span="14">
          <el-form>
            <el-form-item
              label="通知主题"
              label-width="80px"
              style="width: 100%"
            >
              <el-input
                v-model="remindTitle"
                type="textarea"
                placeholder="请输入通知主题"
              ></el-input>
            </el-form-item>
            <ul>
              <li
                v-for="(item, proNewId) of this.chatlist"
                :key="item.proNewId"
              >
                上新ID：<span>{{ item.proNewId }}</span
                >，货号：<span>{{ item.productNo }}</span
                >，颜色：<span>{{ item.colorProperty }}</span>
              </li>
              <li v-if="this.list.length > 5">......</li>
            </ul>
            <span>共计上新记录：{{ this.list.length }}条</span>

            <el-form-item
              label="备注"
              label-width="60px"
              style="margin-top: 50px; width: 100%"
            >
              <el-input
                v-model="remindContent"
                type="textarea"
                placeholder="请输入通知内容"
                :autosize="{ minRows: 4, maxRows: 4 }"
                :style="{ width: '100%' }"
              ></el-input>
            </el-form-item>
          </el-form>
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="margin-top: 50px">
        <el-button type="primary" @click="submit">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div> -->
    </el-dialog>

    <!-- 添加或修改产品二级信息对话框 :on-change="handleChange"-->
    <el-dialog :title="title" :visible.sync="dialogVisible" width="500px" append-to-body v-if="dialogVisible">
      <el-form label-width="150px">
        <el-form-item label="导入模板下载" prop="file">
          <el-button size="mini" plain icon="el-icon-download" @click="currentRoleTemplate">批量模板</el-button>
        </el-form-item>
        <el-form-item label="导入文件" prop="file">
          <el-upload :action="Upload.url" :headers="Upload.headers" :limit="limit" :on-exceed="handleExceed"
            :on-success="handlePictureSuccessPic" :before-upload="beforeAvatarUpload"
            :on-preview="handlePictureCardPreview" :file-list="fileLi" :on-change="changeFile1">
            <el-button size="small" type="primary">导入文件</el-button>
            <!-- <i class="el-icon-plus"></i> -->
          </el-upload>
        </el-form-item>
      </el-form>
    </el-dialog>

    <!-- 添加或修改产品二级信息对话框 :on-change="handleChange"-->
    <el-dialog :title="title" :visible.sync="openUpload" width="500px" append-to-body v-if="openUpload">
      <el-form label-width="150px">
        <el-form-item label="导入模板下载" prop="file">
          <el-button size="mini" plain icon="el-icon-download" @click="downLoadTemplateFile">批量模板</el-button>
        </el-form-item>
        <el-form-item label="导入文件" prop="file">
          <uploadFile :btnName="'批量修改上架时间'" @handleSuccess="getList" :uploadUrl="'/product/relation/updateNewTime'" />
        </el-form-item>
      </el-form>
    </el-dialog>

    <!-- 添加或修改产品二级信息对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <!-- @blur="updateData"
                        @keyup.enter.native="enterBlur($event)" -->

        <el-form-item label="货号" prop="productNo">
          <!-- <el-input v-model="form.productNo" placeholder="请输入货号" /> -->
          <el-select v-model="form.productNo" clearable filterable remote :remote-method="getDatas" :loading="loading"
            placeholder="请选择货号">
            <el-option v-for="item in options" :key="item" :label="item" :value="item">
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="颜色属性" prop="colorProperty">
          <!-- <el-input v-model="form.colorProperty" placeholder="请输入颜色属性" :loading="loading"/> -->
          <el-select @focus="onFocus" ref="selectRef" v-model="form.colorProperty" clearable filterable remote
            :remote-method="getData" placeholder="请选择颜色属性">
            <el-option v-for="item in ColorLike" :key="item" :label="item" :value="item">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="商品上架时间" prop="newTime" label-width="100px">
          <el-date-picker clearable v-model="form.newTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择商品上架时间"
            @change="pickerChangeFn()">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="上架时间备注" prop="newTime" label-width="100px">
          <!-- <el-date-picker clearable v-model="newTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择商品上架时间">
                    </el-date-picker> -->
          <el-input v-model="form.newTimeMark" type="text" placeholder="请输入上架时间备注"></el-input>
        </el-form-item>
        <el-form-item label="上新渠道" prop="newChannel">
          <!-- <el-input v-model="form.newChannel" placeholder="请输入上新渠道" /> -->
          <el-select v-model="newChannel" placeholder="请选择上新渠道" clearable multiple @change="test1" v-if="open">
            <el-option :value="'1'" label="全部" multiple> </el-option>
            <el-option v-for="dict in dict.type.sys_product_qudao" :key="dict.value + ''" :label="dict.label"
              :value="dict.value" />
          </el-select>
        </el-form-item>

        <el-form-item label="尺寸" prop="proNewSizeList">
          <!-- <el-checkbox-group v-model="checked" @change="test">
                        <el-checkbox v-for="item in checkLi" :key="item.id" :label="item.id">{{ item.label }}
                        </el-checkbox>
                    </el-checkbox-group> -->
          <el-select v-model="checked" placeholder="请选择尺寸" clearable multiple @change="test">
            <el-option v-for="dict in dict.type.sys_product_size" :key="dict.value" :label="dict.label"
              :value="dict.value" />
          </el-select>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>
  
<script>
import chatsend from "./chatsend.vue";

import { listData } from "@/api/system/dict/data";
import {
  listSecondry,
  getSecondry,
  delSecondry,
  addSecondry,
  updateSecondry,
  getInfoByName,
  productNoColorLike,
} from "@/api/product/secondry";
import {
  listTemplate,
  getTemplate,
  delTemplate,
  addTemplate,
  updateTemplate,
  addTemplateAndSecondry,
  addProNoColorSize,
  productNoLike,
} from "@/api/product/template";
// import { listData, getData, getDict, delData, addData, updateData } from "@/api/data/data";
import {
  listRole,
  getRole,
  delRole,
  addRole,
  updateRole,
  dataScope,
  changeRoleStatus,
  deptTreeSelect,
  deptTreeNew,
} from "@/api/system/role";
import { getInfo } from "@/api/login.js";
import {
  listRelation,
  getRelation,
  delRelation,
  addRelation,
  updateRelation,
  add,
  selectStaticTime,
  SelectList,
} from "@/api/product/relation";
import {
  listNew,
  getNew,
  delNew,
  addNew,
  updateNew,
  selectStaticWord,
} from "@/api/product/new";
// import { listSecondry, getSecondry, delSecondry, addSecondry, updateSecondry } from "@/api/product/secondry";
import { getcurrentRoleTemplate } from "@/api/data/template";
//--------导入token
import { getToken } from "@/utils/auth";
import { downLoadTemplate } from "@/api/data/template";
export default {
  name: "New",
  dicts: [
    "sys_product_qudao",
    "sys_one_zero",
    "sys_product_size",
    "sys_product_design",
    "sys_product_scene",
    "sys_product_coder",
    "sys_product_yf",
    "sys_product_cycle",
    "sys_product_pl",
    "sys_one_designtraining",
    "sys_product_secondary",
    "sys_product_pp",
  ],
  components: {
    chatsend,
  },
  data() {
    return {
      openNewUpload: false,
      openUpload: false,
      istxChange: false,
      userInfo: "",
      //表格编辑
      randomKey: Math.random(),
      list1: [],

      //是否出货，
      isShippingTime: true,

      defaultProps: {
        children: "childList",
        label: "staticName",
      },
      // 设计-设计师
      designDesignersList: [],
      // designSize: "",
      opendesignDesigners: false,
      // 运营-备注
      operationalRemarksList: [],
      // designSize: "",
      openoperationalRemarks: false,

      // 设计-尺码
      designSizeList: [],
      designSize: "",
      opendesignSize: false,

      // 商品\n上架时间备注
      newTimeMarkList: [],
      newTimeMark: "",
      opennewTimeMark: false,

      // 采购-货号
      productNoList: [],
      productNo: undefined,
      openproductNo: false,

      // 采购-备注
      procureRemarkList: [],
      procureRemark: undefined,
      openprocureRemark: false,

      // 商品-上新渠道
      newChannelList: [],
      newChannel: "",
      opennewChannel: false,

      // 商品-主推款
      operationMainProductsList: [],
      operationMainProducts: "",
      openoperationMainProducts: false,

      // 运营-层级
      operationLevelList: [],
      operationLevel: "",
      openoperationLevel: false,

      // 采购-主面料名称
      designFabricNameList: [],
      designFabricName: "",
      opendesignFabricName: false,

      // 设计-拍摄样板进度
      designShootingSampleList: [],
      designShootingSample: "",
      openShootingSample: false,
      //全选/全不选
      menuNodeAll: false,

      //运营-n预览架时间
      // visionoperationPreviewPlanTime: [],
      // operationPreviewPlanTime: "",
      // openoperationPreviewPlanTime: false,

      //运营-计划上架时间
      visionoperationPlanTime: [],
      operationPlanTime: "",
      openoperationPlanTime: false,

      //运营-预览时间
      visionoperationPreviewPlanTime: [],
      operationPreviewPlanTime: "",
      openoperationPreviewPlanTime: false,

      //商品-上架时间
      visionNewTime: [],
      NewTime: "",
      openNewTime: false,

      //采购-出货时间
      visionShippingTime: [],
      ShippingTime: "",
      openShippingTime: false,

      //摄影-计划拍摄时间
      visionShootingPlan: [],
      ShootingPlan: "",
      openShootingPlan: false,
      //摄影-完成拍摄时间
      visionShootingPlanMark: [],
      ShootingPlanMark: "",
      openShootingPlanMark: false,
      //滚动条
      Nowscroll: "",
      scrollLeft: "",
      //模糊匹配
      ColorLike: [],
      options: [], // 选项，从后端传递过来
      tableHeight: "",
      newChannel: [],

      //侧边栏操作
      isShowColumn: false,
      // 列的配置化对象，存储配置信息
      checkList: {},
      showColumn: {
        proNewId: true,
        merchandiseBrand: true,
        productNo: true,
        picUrl: true,
        colorProperty: true,
        procureRemark: true,
        operationMainProducts: true,
        operationLevel: true,
        operationMainColor: true,
        merchandiseSalePrice: true,
        merchandiseTagPrice: true,
        firstLevelColumn: true,
        firstLevelExtendedColumn: true,
        secondLevelColumn: true,
        proNewSizeList: true,
        orderNum: true,
        orderTime: true,
        manufacturerCode: true,
        procureWeavingPeriod: true,
        procureStainPeriod: true,
        workshopCycle: true,
        shippingTime: true,
        visionShootingPlan: true,
        visionShootingPlanMark: true,
        designDesigners: true,
        designSeries: true,
        mainScene: true,
        designSpecialCases: true,
        designSpecialCasesPic: true,
        designMatchingNumber: true,
        designMatchingPicture: true,
        designRecommendNumber: true,
        designRecommendPicture: true,
        designScene: true,
        designShootingScene: true,
        designShootingSample: true,
        designTraining: true,
        logoUrl: true,
        logoPosition: true,
        fabricComposition: true,
        designFabricFunction: true,
        designFabricName: true,
        designProductCategories: true,
        designChestPad: true,
        designShockproofDegree: true,
        designGatheringDegree: true,
        designLiningMaterial: true,
        designRecommendedSizes: true,
        designSize: true,

        designSpecialFabric: true,
        designSpecialPresentation: true,
        copywritingDetailPage: true,
        copywritingFunctionDisplay: true,
        copywritingDetailShow: true,
        copywritingDesignPrinciple: true,
        copywritingPosterCopy: true,
        operationMainSelling: true,
        copywritingMainSelling: true,
        copywritingVideo: true,
        copywritingFamily: true,
        copywritingFabricName: true,
        copywritingNickname: true,
        photographyPlane: true,
        photographyVideo: true,
        visionShooting3d: true,
        visionRetouchingProgress: true,
        photographyVideoEditing: true,
        newTime: true,
        newTimeMark: true,
        channelList: true,
        operationPlanTime: true,
        operationalRemarks: true,
        operationPreviewPlanTime: true,
        operationJingdongUploaded: true,
        operationJingdongMain: true,
        designPropertyCategory: true,
        designFitCup: true,
        designSuitableBody: true,
        designGarmentTrouser: true,
        designExerciseIntensity: true,
        designFlexibility: true,
        designFitnessLevels: true,
        designSomatosensory: true,
        designSoftness: true,
        designFabricThickness: true,
        designBreathability: true,
        purchasingAccessoriesMark: true,
        purchasingBeforePicurl: true,
        purchasingAfterPicurl: true,
        visionPic: true,
        operationChannlLink: true,
        purchasingReportAttachments: true,
        fabricTestRepor: true,
      },

      //搜索栏展示和收起
      isOpen: false,
      // fileLi: [{ url: "" }],
      fileLi: [],
      file: "",

      //通知post
      remindTitle: "",
      remindContent: "",
      f: {},
      //通知get
      list: [],
      chatlist: [],
      isVisible: false,
      //部门
      deptOptions: [],
      addStageLabelList: [],

      proNewVO: {},
      pjtUrl: process.env.VUE_APP_BASE_API,
      // libubai: true,
      // proTemplateSizeList: [],

      checked: [],
      checkLi: [
        { id: 1, label: "XS" },
        { id: 2, label: "S" },
        { id: 3, label: "M" },
        { id: 4, label: "L" },
        { id: 5, label: "XL" },
        { id: 6, label: "XXL" },
        { id: 7, label: "均码" },
      ],
      //图片相对路径
      picurl: "",
      //图片地址
      picUrl: "",
      //logo相对路径
      logoUrl: "",
      pjtUrl: process.env.VUE_APP_BASE_API,
      // 图片数量限制
      limit: 2,
      //页面上存的暂时图片地址List
      files: [{ url: "" }],
      //页面上存的暂时logo图片地址List
      fileList: [{ url: "" }],
      //图片地址
      imageUrl: "",

      dialogVisible: false,
      imgUpload: {
        // 设置上传的请求头部
        headers: {
          Authorization: "Bearer " + getToken(),
        },
        // 图片上传的方法地址:
        url: process.env.VUE_APP_BASE_API + "/common/upload",
      },
      Upload: {
        // 设置上传的请求头部
        headers: {
          Authorization: "Bearer " + getToken(),
        },
        // 图片上传的方法地址:
        url: process.env.VUE_APP_BASE_API + "/product/excel/uploadExcel",
      },
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 产品上新表格数据
      newList: [],
      // 产品二级信息表格数据
      secondryList: [],
      // 产品关联信息表格数据
      relationList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,

      // 全局查询参数
      queryParams: {
        //设计师
        designDesignersList: null,
        //运营-计划上架时间
        operationPlanTimeList: null,
        //设计尺码
        designSize: null,
        //拍摄样板进度
        designShootingSampleList: null,
        //面料名称
        designFabricNameList: null,
        //商品-上架时间备注
        newTimeMarkList: null,
        //采购-货号
        productNoList: null,
        //出货时间
        shippingTimeList: null,
        //摄影-计划拍摄时间
        visionShootingPlanList: null,
        //摄影-完成拍摄时间
        visionShootingPlanMarkList: null,
        newTimeList: null,

        productNo: null,
        manufacturerCode: null,
        newTime: null,
        newChannel: null,
        pageNum: 1,
        pageSize: 10,
        templateId: null,
        // picName: null,
        // picUrl: null,
        colorProperty: null,
        //商品计划上架时间
        merchandisePlanTime: null,
        merchandisePlanTimeStart: null,
        merchandisePlanTimeEnd: null,
        //运营计划上架时间
        operationPlanTime: null,
        operationPlanTimeStart: null,
        operationPlanTimeEnd: null,
        //采购-下单时间
        orderTime: null,
        orderTimeStart: null,
        orderTimeEnd: null,
        //采购-出货时间
        shippingTime: null,
        shippingTimeStart: null,
        shippingTimeEnd: null,
        //运营-运营预览架时间
        operationPreviewPlanTime: null,
        operationPreviewPlanTimeStart: null,
        operationPreviewPlanTimeEnd: null,
        //计划拍摄时间
        visionShootingPlan: null,
        visionShootingPlanStart: null,
        visionShootingPlanEnd: null,
        //完成拍摄时间
        visionShootingPlanMark: null,
        visionShootingPlanMarkStart: null,
        visionShootingPlanMarkEnd: null,

        //一级类目，三级类目
        firstLevelColumn: null,
        firstLevelExtendedColumn: null,
        secondLevelColumn: null,
        merchandiseBrand: null,
        //商品-主推款
        operationMainProducts: null,
        //商品上架时间
        newTimeStart: null,
        newTimeEnd: null,

        //采购备注
        procureRemark: null,
        newStatus: 0,
        isShippingTime: null,
        // salePrice: null,
        // tagPrice: null,
        // logoName: null,
        // logoUrl: null,
        //筛选项
        // staticWord: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        productNo: [
          { required: true, message: "货号不能为空", trigger: "blur" },
        ],
      },
      j: [],
    };
  },
  watch: {
    // 监听复选框配置列所有的变化
    checkList: {
      handler: function (newnew, oldold) {
        // console.log(newnew);
        this.showColumn = newnew;
        // 这里需要让表格重新绘制一下，否则会产生固定列错位的情况
        // console.log(new Date());
        this.$nextTick(() => {
          this.$refs.table.doLayout();
          // console.log('渲染完成时间', new Date());
        });
      },
      deep: true,
      immediate: true,
    },

    // 根据名称筛选部门树
    productNo(val) {
      this.$refs.productNo.filter(val);
    },
    // 根据名称筛选部门树
    procureRemark(val) {
      this.$refs.procureRemark.filter(val);
    },
  },
  created() {
    localStorage.removeItem("shippingTime");
    localStorage.removeItem("visionShootingPlan");
    localStorage.removeItem("visionShootingPlanMark");

    localStorage.removeItem("newTime");
    localStorage.removeItem("operationPlanTime");
    localStorage.removeItem("operationPreviewPlanTime");

    localStorage.removeItem("newTimeMark");
    localStorage.removeItem("openoperationalRemarks");
    localStorage.removeItem("designDesigners");
    localStorage.removeItem("productNo");
    localStorage.removeItem("designFabricName");
    localStorage.removeItem("application"); //designShootingSample的别名，不删
    localStorage.removeItem("designShootingSample");
    localStorage.removeItem("operationMainProducts");
    localStorage.removeItem("operationLevel");
    // var obj = this.queryParams;

    // delete obj.visionShootingPlanList;
    // delete obj.shippingTimeList;
    // delete obj.designShootingSampleList;
    // delete obj.designSize;
    // delete obj.operationPlanTimeList;
    // delete obj.designFabricNameList;
    // delete obj.newTimeMarkList;
    // delete obj.productNoList;
    var storeForm = JSON.parse(localStorage.getItem("storeForm"));
    if (storeForm) {
      // this.$set(this.queryParams, storeForm)
      this.queryParams = storeForm;
    }
    var otherVal = JSON.parse(localStorage.getItem("otherVal"));
    if (otherVal) {
      this.$set(this.queryParams, "pageNum", otherVal.currentPage);
      this.$set(this.queryParams, "pageSize", otherVal.pageSize);

      // this.Nowscroll = otherVal.scrollTop
      // this.scrollLeft = otherVal.scrollLeft
    }
    console.log(this.queryParams.pageNum);

    console.log(this.$route.query.id);
    // const id = this.$route.query.id

    // console.log(console.log(this.data$route.query.));
    // console.log(options.id);
    this.getList();

    getInfo().then((res) => {
      this.userInfo = res.roles[0];
      console.log(JSON.stringify(this.userInfo));
    });
  },

  //记得清空  如果在keepalive中 则使用activated  deactivated
  destroyed() {
    window.onresize = null;
  },
  mounted() {
    // var otherVal = JSON.parse(localStorage.getItem("otherVal"))
    // if (otherVal) {

    // }

    var _this = this;
    this.resizeTable();
    window.onresize = function () {
      _this.resizeTable();
    };

    // 发请求得到checkListInitData的列的名字
    if (localStorage.getItem("columnSet")) {
      this.checkList = JSON.parse(localStorage.getItem("columnSet"));
    } else {
      this.checkList = {
        proNewId: true,
        merchandiseBrand: true,
        productSeason: true,
        productNo: true,
        picUrl: true,
        colorProperty: true,
        procureRemark: true,
        operationMainProducts: true,
        operationLevel: true,
        operationMainColor: true,
        merchandiseSalePrice: true,
        merchandiseTagPrice: true,
        firstLevelColumn: true,
        firstLevelExtendedColumn: true,
        secondLevelColumn: true,
        proNewSizeList: true,
        orderNum: true,
        orderTime: true,
        manufacturerCode: true,
        procureWeavingPeriod: true,
        procureStainPeriod: true,
        workshopCycle: true,
        shippingTime: true,
        visionShootingPlan: true,
        visionShootingPlanMark: true,
        designDesigners: true,
        designSeries: true,
        mainScene: true,
        designSpecialCases: true,
        designSpecialCasesPic: true,
        designMatchingNumber: true,
        designMatchingPicture: true,
        designRecommendNumber: true,
        designRecommendPicture: true,
        designScene: true,
        designShootingScene: true,
        designShootingSample: true,
        designTraining: true,
        logoUrl: true,
        logoPosition: true,
        fabricComposition: true,
        designFabricFunction: true,
        designFabricName: true,
        designProductCategories: true,
        designChestPad: true,
        designShockproofDegree: true,
        designGatheringDegree: true,
        designLiningMaterial: true,
        designRecommendedSizes: true,
        designSize: true,

        designSpecialFabric: true,
        designSpecialPresentation: true,
        copywritingDetailPage: true,
        copywritingFunctionDisplay: true,
        copywritingDetailShow: true,
        copywritingDesignPrinciple: true,
        copywritingPosterCopy: true,
        operationMainSelling: true,
        copywritingMainSelling: true,
        copywritingVideo: true,
        copywritingFamily: true,
        copywritingFabricName: true,
        copywritingNickname: true,
        photographyPlane: true,
        photographyVideo: true,
        visionShooting3d: true,
        visionRetouchingProgress: true,
        photographyVideoEditing: true,
        newTime: true,
        newTimeMark: true,
        channelList: true,
        operationPlanTime: true,
        operationalRemarks: true,
        operationPreviewPlanTime: true,
        operationJingdongUploaded: true,
        operationJingdongMain: true,
        designPropertyCategory: true,
        designFitCup: true,
        designSuitableBody: true,
        designGarmentTrouser: true,
        designExerciseIntensity: true,
        designFlexibility: true,
        designFitnessLevels: true,
        designSomatosensory: true,
        designSoftness: true,
        designFabricThickness: true,
        designBreathability: true,
        purchasingAccessoriesMark: true,
        purchasingBeforePicurl: true,
        purchasingAfterPicurl: true,
        visionPic: true,
        operationChannlLink: true,
        purchasingReportAttachments: true,
        fabricTestRepor: true,
        // date: true,
        // name: true,
        // provinces: true,
        // city: true,
        // adreess: true,
        // zipCode: true,
        // purchase: true,
        // merchandise: true,
        // operation: true,
        // vision: true,
        // design: true,
        // copywriting: true,
        // shot: true,
        // customer: true
      };
    }
  },
  methods: {
    downNewUpload() {
      let obj = {
        templateName: "批量上新模板",
      };
      downLoadTemplate(obj).then((response) => {
        window.location.href =
          process.env.VUE_APP_BASE_API + response.rows[0].templateUrl;
      });
    },
    downLoadTemplateFile() {
      let obj = {
        templateName: "批量修改上架时间",
      };
      downLoadTemplate(obj).then((response) => {
        window.location.href =
          process.env.VUE_APP_BASE_API + response.rows[0].templateUrl;
      });
    },
    //全选设计-尺码
    handleCheckeddesignSize(value) {
      console.log(JSON.stringify(value));
      if (value) {
        this.opendesignSize = false;
        // this.resetQuery()
        listRelation({ newStatus: 0 }).then((response) => {
          this.relationList = response.rows;
          console.log(JSON.stringify(this.relationList));

          this.total = response.total;
          this.loading = false;
        });
      } else {
        return;
      }
    },
    // 设计-尺码
    submitDesignSize() {
      this.opendesignSize = false;
      this.queryParams.designSize = this.designSize;

      this.getList();
    },

    handleDesignSize(n, obj) {
      console.log("n====>", JSON.stringify(n));
      console.log("obj====>", JSON.stringify(obj));
      console.log(JSON.stringify(obj.checkedNodes));
      const names = obj.checkedNodes.map((user) => user.label);
      console.log(JSON.stringify(names.join(",")));
      this.designSize = names.join(",");
    },
    // 设计-尺码
    cancelDesignSize() {
      this.opendesignSize = false;
    },
    chatDesignSize() {
      this.getStaticWord("designSize");

      this.opendesignSize = true;
    },

    //  商品-上架时间备注
    submitnewTimeMark() {
      this.opennewTimeMark = false;
      let j = this.getMenuAllCheckedKeysnewTimeMark();
      localStorage.setItem("newTimeMark", JSON.stringify(j));
      let Data = j.map(
        (item) => this.newTimeMarkList.filter((i) => i?.id == item)[0]
      );
      console.log(JSON.stringify(Data));

      const names = Data.map((user) => user.label);
      this.queryParams.newTimeMarkList = names.join(",");

      this.getList();
    },

    handlenewTimeMark(n, obj) {
      console.log("n====>", JSON.stringify(n));
      console.log("obj====>", JSON.stringify(obj));
      console.log(JSON.stringify(obj.checkedNodes));
      const names = obj.checkedNodes.map((user) => user.label);
      console.log(JSON.stringify(names.join(",")));
      this.newTimeMark = names.join(",");
    },
    // 商品-上架时间备注
    cancelnewTimeMark() {
      this.opennewTimeMark = false;
    },
    chatNewTimeMark() {
      this.getStaticWord("newTimeMark");
      this.localStorageStringTree("newTimeMark");
      this.opennewTimeMark = true;
    },

    //  运营-备注
    submitoperationalRemarks() {
      this.openoperationalRemarks = false;
      let j = this.getMenuAllCheckedKeysoperationalRemarks();
      localStorage.setItem("operationalRemarks", JSON.stringify(j));
      let Data = j.map(
        (item) => this.operationalRemarksList.filter((i) => i?.id == item)[0]
      );
      console.log(JSON.stringify(Data));

      const names = Data.map((user) => user.label);
      this.queryParams.operationalRemarksList = names.join(",");

      this.getList();
    },
    // 运营-备注
    canceloperationalRemarks() {
      this.openoperationalRemarks = false;
    },
    chatoperationalRemarks() {
      this.getStaticWord("operationalRemarks");
      this.localStorageStringTree("operationalRemarks");
      this.openoperationalRemarks = true;
    },

    //  设计-设计师
    submitdesignDesigners() {
      this.opendesignDesigners = false;
      let j = this.getMenuAllCheckedKeysdesignDesigners();
      localStorage.setItem("designDesigners", JSON.stringify(j));
      let Data = j.map(
        (item) => this.designDesignersList.filter((i) => i?.id == item)[0]
      );
      console.log(JSON.stringify(Data));

      const names = Data.map((user) => user.label);
      this.queryParams.designDesignersList = names.join(",");

      this.getList();
    },
    // 设计-设计师
    canceldesignDesigners() {
      this.opendesignDesigners = false;
    },
    chatdesignDesigners() {
      this.getStaticWord("designDesigners");
      this.localStorageStringTree("designDesigners");
      this.opendesignDesigners = true;
    },
    //  采购-货号
    submitproductNo() {
      this.openproductNo = false;
      let j = this.getMenuAllCheckedKeysproductNo();
      localStorage.setItem("productNo", JSON.stringify(j));
      let Data = j.map(
        (item) => this.productNoList.filter((i) => i?.id == item)[0]
      );
      console.log(JSON.stringify(Data));

      const names = Data.map((user) => user.label);
      this.queryParams.productNoList = names.join(",");

      this.getList();
    },

    handleproductNo(n, obj) {
      console.log("n====>", JSON.stringify(n));
      console.log("obj====>", JSON.stringify(obj));
      console.log(JSON.stringify(obj.checkedNodes));
      const names = obj.checkedNodes.map((user) => user.label);
      console.log(JSON.stringify(names.join(",")));
      this.productNo = names.join(",");
    },
    // 采购-货号
    cancelproductNo() {
      this.openproductNo = false;
    },

    chatproductNo() {
      this.getStaticWord("productNo");
      //取上新管理字符串树缓存数据
      this.localStorageStringTree("productNo");

      this.openproductNo = true;
    },

    // 勾选的采购备注
    submitprocureRemark() {
      let j = this.getMenuAllCheckedKeysprocureRemark();
      console.log(JSON.stringify(j));
      localStorage.setItem("procureRemark", JSON.stringify(j));

      let Data = j.map(
        (item) => this.procureRemarkList.filter((i) => i?.id == item)[0]
      );
      console.log(JSON.stringify(Data));

      const names = Data.map((user) => user.label);
      this.queryParams.procureRemarkList = names.join(",");

      this.openprocureRemark = false;
      // this.queryParams.designShootingSampleList = this.designShootingSample

      this.getList();
    },

    // 关闭勾选的采购备注
    cancelprocureRemark() {
      this.openprocureRemark = false;
    },
    //打开勾选的采购备注
    chatprocureRemark() {
      this.getStaticWord("procureRemark");
      // //加载上新管理字符串树缓存数据
      this.localStorageStringTree("procureRemark");
      this.openprocureRemark = true;
    },

    // 勾选的商品-主推款
    submitoperationMainProducts() {
      let j = this.getMenuAllCheckedKeysoperationMainProducts();
      console.log(JSON.stringify(j));
      localStorage.setItem("operationMainProducts", JSON.stringify(j));

      let Data = j.map(
        (item) => this.operationMainProductsList.filter((i) => i?.id == item)[0]
      );
      console.log(JSON.stringify(Data));

      const names = Data.map((user) => user.label);
      this.queryParams.operationMainProductsList = names.join(",");

      this.openoperationMainProducts = false;
      // this.queryParams.designShootingSampleList = this.designShootingSample

      this.getList();
    },

    // 关闭勾选的运营-主推款
    canceloperationMainProducts() {
      this.openoperationMainProducts = false;
    },
    //打开勾选的运营-主推款
    chatoperationMainProducts() {
      this.getStaticWord("OperationMainProducts");
      // //加载上新管理字符串树缓存数据
      this.localStorageStringTree("operationMainProducts");
      this.openoperationMainProducts = true;
    },

    // 勾选的运营-层级
    submitoperationLevel() {
      let j = this.getMenuAllCheckedKeysoperationLevel();
      console.log(JSON.stringify(j));
      localStorage.setItem("operationLevel", JSON.stringify(j));

      let Data = j.map(
        (item) => this.operationLevelList.filter((i) => i?.id == item)[0]
      );
      console.log(JSON.stringify(Data));

      const names = Data.map((user) => user.label);
      this.queryParams.operationLevelList = names.join(",");

      this.openoperationLevel = false;
      // this.queryParams.designShootingSampleList = this.designShootingSample

      this.getList();
    },

    // 关闭勾选的运营-层级
    canceloperationLevel() {
      this.openoperationLevel = false;
    },
    //打开勾选的运营-层级
    chatoperationLevel() {
      this.getStaticWord("operationLevel");
      // //加载上新管理字符串树缓存数据
      this.localStorageStringTree("operationLevel");
      this.openoperationLevel = true;
    },

    // 勾选的商品-上新渠道
    submitnewChannel() {
      let j = this.getMenuAllCheckedKeysnewChannel();
      console.log(JSON.stringify(j));
      localStorage.setItem("newChannel", JSON.stringify(j));

      let Data = j.map(
        (item) => this.newChannelList.filter((i) => i?.id == item)[0]
      );
      console.log(JSON.stringify(Data));

      const names = Data.map((user) => user.label);
      this.queryParams.newChannelList = names.join(",");

      this.opennewChannel = false;
      // this.queryParams.designShootingSampleList = this.designShootingSample

      this.getList();
    },

    // 关闭勾选的商品-上新渠道
    cancelnewChannel() {
      this.opennewChannel = false;
    },
    //打开勾选的商品-上新渠道
    chatnewChannel() {
      this.getStaticWord("newChannel");
      // //加载上新管理字符串树缓存数据
      this.localStorageStringTree("newChannel");
      this.opennewChannel = true;
    },

    // 勾选的主面料名称筛选
    submitdesignFabricName() {
      let j = this.getMenuAllCheckedKeysdesignFabricName();
      console.log(JSON.stringify(j));
      localStorage.setItem("designFabricName", JSON.stringify(j));

      let Data = j.map(
        (item) => this.designFabricNameList.filter((i) => i?.id == item)[0]
      );
      console.log(JSON.stringify(Data));

      const names = Data.map((user) => user.label);
      this.queryParams.designFabricNameList = names.join(",");

      this.opendesignFabricName = false;
      // this.queryParams.designShootingSampleList = this.designShootingSample

      this.getList();
    },

    // 关闭勾选的主面料名称筛选
    canceldesignFabricName() {
      this.opendesignFabricName = false;
    },
    //打开勾选的主面料名称筛选
    chatdesignFabricName() {
      this.getStaticWord("designFabricName");
      //加载上新管理字符串树缓存数据
      this.localStorageStringTree("designFabricName");
      this.opendesignFabricName = true;
    },

    // 设计-拍摄样板进度
    submitShootingSample() {
      let j = this.getMenuAllCheckedKeys();
      console.log(JSON.stringify(j));
      localStorage.setItem("designShootingSample", JSON.stringify(j));

      let Data = j.map(
        (item) => this.designShootingSampleList.filter((i) => i?.id == item)[0]
      );
      console.log(JSON.stringify(Data));
      this.queryParams.designShootingSampleList = Data.map(
        (user) => user.label
      ).join(",");

      this.openShootingSample = false;
      // return;
      // this.queryParams.designShootingSampleList = this.designShootingSample

      // this.postList();
      this.getList();
    },

    handleShootingSample(n, obj) {
      console.log("n====>", JSON.stringify(n));
      console.log("obj====>", JSON.stringify(obj));
      console.log(JSON.stringify(obj.checkedNodes));
      const names = obj.checkedNodes.map((user) => user.label);
      console.log(JSON.stringify(names.join(",")));
      this.designShootingSample = names.join(",");
    },
    // 设计-拍摄样板进度
    cancelShootingSample() {
      this.openShootingSample = false;
    },
    chatShootingSample() {
      this.getStaticWord("designShootingSample");
      this.localStorageStringTree("designShootingSample");
      this.openShootingSample = true;
    },

    //筛选采购-出货时间
    submitShippingTime() {
      let j = this.getMenuAllCheckedKeysshippingTime();
      console.log(JSON.stringify(j));
      localStorage.setItem("shippingTime", JSON.stringify(j));

      // let Data = j.map(
      //   (item) => this.visionShippingTime.filter((i) => i?.index == item)[0]
      // );
      // console.log(JSON.stringify(Data));
      // this.queryParams.shippingTimeList = Data.map(
      //   (user) => user.staticName
      // ).join(",");
      this.queryParams.shippingTimeList = this.ShippingTime;
      this.openShippingTime = false;
      this.getList();
    },

    handleShippingTime(n, obj) {
      console.log("n====>", JSON.stringify(n));
      console.log("obj====>", JSON.stringify(obj));
      console.log(JSON.stringify(obj.checkedNodes));
      const names = obj.checkedNodes.map((user) => user.staticDate);
      // console.log(JSON.stringify(names.join(",")));
      let timeArr = [];
      names.forEach((item) => {
        if (item.includes("-")) {
          timeArr.push(item);
        }
      });
      this.ShippingTime = timeArr.join(",");
    },
    //采购-出货时间
    cancelShippingTime() {
      this.openShippingTime = false;
    },
    chatShippingTime() {
      this.chatgpt("shippingTime");
      this.localStorageStringTree("shippingTime");
      this.openShippingTime = true;
    },

    // 商品-上架时间
    submitNewTime() {
      let j = this.getMenuAllCheckedKeysnewTime();
      console.log(JSON.stringify(j));
      localStorage.setItem("newTime", JSON.stringify(j));

      this.openNewTime = false;
      this.queryParams.newTimeList = this.NewTime;

      this.getList();
    },

    handleNewTime(n, obj) {
      console.log("n====>", JSON.stringify(n));
      console.log("obj====>", JSON.stringify(obj));
      console.log(JSON.stringify(obj.checkedNodes));
      const names = obj.checkedNodes.map((user) => user.staticDate);
      // console.log(JSON.stringify(names.join(",")));
      let timeArr = [];
      names.forEach((item) => {
        if (item.includes("-")) {
          timeArr.push(item);
        }
      });
      this.NewTime = timeArr.join(",");
      // this.NewTime = names.join(",");
    },
    // 商品-上架时间
    cancelNewTime() {
      this.openNewTime = false;
    },
    chatNewTime() {
      this.chatgpt("newTime");
      this.localStorageStringTree("newTime");
      this.openNewTime = true;
    },

    // 运营-计划上架时间
    submitoperationPlanTime() {
      let j = this.getMenuAllCheckedKeysoperationPlanTime();
      console.log(JSON.stringify(j));
      localStorage.setItem("operationPlanTime", JSON.stringify(j));

      this.openoperationPlanTime = false;
      this.queryParams.operationPlanTimeList = this.operationPlanTime;

      this.getList();
    },

    handleoperationPlanTime(n, obj) {
      console.log("n====>", JSON.stringify(n));
      console.log("obj====>", JSON.stringify(obj));
      console.log(JSON.stringify(obj.checkedNodes));
      const names = obj.checkedNodes.map((user) => user.staticDate);
      // console.log(JSON.stringify(names.join(",")));
      let timeArr = [];
      names.forEach((item) => {
        if (item.includes("-")) {
          timeArr.push(item);
        }
      });
      this.operationPlanTime = timeArr.join(",");
      // this.operationPlanTime = names.join(",");
    },
    // 运营-计划上架时间
    canceloperationPlanTime() {
      this.openoperationPlanTime = false;
    },
    chatoperationPlanTime() {
      this.chatgpt("operationPlanTime");
      this.localStorageStringTree("operationPlanTime");
      this.openoperationPlanTime = true;
    },

    // 运营-计划上架时间
    submitoperationPreviewPlanTime() {
      let j = this.getMenuAllCheckedKeysoperationPreviewPlanTime();
      console.log(JSON.stringify(j));
      localStorage.setItem("operationPreviewPlanTime", JSON.stringify(j));

      this.openoperationPreviewPlanTime = false;
      this.queryParams.operationPreviewPlanTimeList =
        this.operationPreviewPlanTime;

      this.getList();
    },
    handleoperationPreviewPlanTime(n, obj) {
      console.log("n====>", JSON.stringify(n));
      console.log("obj====>", JSON.stringify(obj));
      console.log(JSON.stringify(obj.checkedNodes));
      const names = obj.checkedNodes.map((user) => user.staticDate);
      // console.log(JSON.stringify(names.join(",")));
      let timeArr = [];
      names.forEach((item) => {
        if (item.includes("-")) {
          timeArr.push(item);
        }
      });
      this.operationPreviewPlanTime = timeArr.join(",");
      // this.operationPlanTime = names.join(",");
    },
    // 运营-预览时间
    canceloperationPreviewPlanTime() {
      this.openoperationPreviewPlanTime = false;
    },
    chatoperationPreviewPlanTime() {
      this.chatgpt("operationPreviewPlanTime");
      this.localStorageStringTree("operationPreviewPlanTime");
      this.openoperationPreviewPlanTime = true;
    },

    //筛选完成拍摄时间
    submitShootingPlanMark() {
      let j = this.getMenuAllCheckedKeysvisionShootingPlanMark();
      console.log(JSON.stringify(j));
      localStorage.setItem("visionShootingPlanMark", JSON.stringify(j));

      this.openShootingPlanMark = false;
      this.queryParams.visionShootingPlanMarkList = this.ShootingPlanMark;

      this.getList();
    },

    handleShootingPlanMark(n, obj) {
      console.log("n====>", JSON.stringify(n));
      console.log("obj====>", JSON.stringify(obj));
      console.log(JSON.stringify(obj.checkedNodes));
      const names = obj.checkedNodes.map((user) => user.staticDate);
      // console.log(JSON.stringify(names.join(",")));
      let timeArr = [];
      names.forEach((item) => {
        if (item.includes("-")) {
          timeArr.push(item);
        }
      });
      this.ShootingPlanMark = timeArr.join(",");
      // this.ShootingPlanMark = names.join(",");
    },
    //筛选完成拍摄时间
    cancelShootingPlanMark() {
      this.openShootingPlanMark = false;
    },
    chatShootingPlanMark() {
      this.chatgpt("visionShootingPlanMark");
      this.localStorageStringTree("visionShootingPlanMark");
      this.openShootingPlanMark = true;
    },

    //筛选计划拍摄时间
    submitShootingPlan() {
      let j = this.getMenuAllCheckedKeysvisionShootingPlan();
      console.log(JSON.stringify(j));
      localStorage.setItem("visionShootingPlan", JSON.stringify(j));

      this.openShootingPlan = false;
      this.queryParams.visionShootingPlanList = this.ShootingPlan;

      this.getList();
    },

    handleShootingPlan(n, obj) {
      console.log("n====>", JSON.stringify(n));
      console.log("obj====>", JSON.stringify(obj));
      console.log(JSON.stringify(obj.checkedNodes));
      const names = obj.checkedNodes.map((user) => user.staticDate);
      // console.log(JSON.stringify(names.join(",")));
      let timeArr = [];
      names.forEach((item) => {
        if (item.includes("-")) {
          timeArr.push(item);
        }
      });
      this.ShootingPlan = timeArr.join(",");
      // this.ShootingPlan = names.join(",");
    },
    //筛选计划拍摄时间
    cancelShootingPlan() {
      this.openShootingPlan = false;
    },
    chatShootingPlan() {
      this.chatgpt("visionShootingPlan");
      this.localStorageStringTree("visionShootingPlan");
      this.openShootingPlan = true;
    },
    // 打开加载层
    openLoading() {
      this.$modal.loading("正在加载数据，请稍候！");
    },
    // 设计-拍摄样板进度
    getStaticWord(dateName) {
      // this.queryParams.staticWord = dateName;
      var obj = this.queryParams;

      // delete obj.visionShootingPlanList;
      // delete obj.shippingTimeList;
      // delete obj.designShootingSampleList;
      // delete obj.designSize;
      // delete obj.operationPlanTimeList;
      // delete obj.designFabricNameList;
      // delete obj.newTimeMarkList;
      // delete obj.productNoList;
      console.log(JSON.stringify(obj));
      // return
      this.openLoading();
      selectStaticWord({ staticWord: dateName, ...obj }).then((res) => {
        this.$modal.closeLoading();
        console.log(JSON.stringify(res));
        if (dateName == "designShootingSample") {
          var j = [];
          res.forEach((item, index) => {
            j.push({ label: item, id: index });
          });
          this.designShootingSampleList = j;
        } else if (dateName == "designFabricName") {
          var j = [];
          res.forEach((item, index) => {
            j.push({ label: item, id: index });
          });
          //主面料名称筛选
          this.designFabricNameList = j;
        } else if (dateName == "newTimeMark") {
          var j = [];
          res.forEach((item, index) => {
            j.push({ label: item, id: index });
          });
          // 商品-上架时间备注
          this.newTimeMarkList = j;
        } else if (dateName == "designDesigners") {
          var j = [];
          res.forEach((item, index) => {
            j.push({ label: item, id: index });
          });
          // 设计师
          this.designDesignersList = j;
        } else if (dateName == "operationalRemarks") {
          var j = [];
          res.forEach((item, index) => {
            j.push({ label: item, id: index });
          });
          // 运营-备注
          this.operationalRemarksList = j;
        } else if (dateName == "productNo") {
          var j = [];
          res.forEach((item, index) => {
            j.push({ label: item, id: index });
          });
          // 采购-货号
          this.productNoList = j;
        } else if (dateName == "procureRemark") {
          var j = [];
          res.forEach((item, index) => {
            j.push({ label: item, id: index });
          });
          // 采购-备注
          this.procureRemarkList = j;
        } else if (dateName == "newChannel") {
          var j = [];
          res.forEach((item, index) => {
            j.push({ label: item, id: index });
          });

          // 商品-上新渠道
          this.newChannelList = j;
        } else if (dateName == "OperationMainProducts") {
          var j = [];
          res.forEach((item, index) => {
            j.push({ label: item, id: index });
          });
          // 商品-主推款
          this.operationMainProductsList = j;
        } else if (dateName == "operationLevel") {
          var j = [];
          res.forEach((item, index) => {
            j.push({ label: item, id: index });
          });
          // 运营-层级
          this.operationLevelList = j;
        } else if (dateName == "designSize") {
          let res = ["空白"];
          var m = [];
          res.forEach((item) => {
            if (item == "空白") {
              m.push({ label: item });
            }
          });
          console.log(JSON.stringify(m));
          this.designSizeList = m;
        }
      });
    },

    // 筛选节点
    filterNode(value, data) {
      if (!value) return true;
      return data.label.indexOf(value) !== -1;
    },

    // 树权限（全选/全不选）
    handleCheckedTreeNodeAll(value, type) {
      console.log(JSON.stringify(value));
      if (type == "designShootingSample") {
        this.$refs.designShootingSample.setCheckedNodes(
          value ? this.designShootingSampleList : []
        );
      } else if (type == "designFabricName") {
        this.$refs.designFabricName.setCheckedNodes(
          value ? this.designFabricNameList : []
        );
      } else if (type == "productNo") {
        this.$refs.productNo.setCheckedNodes(value ? this.productNoList : []);
      } else if (type == "newTimeMark") {
        this.$refs.newTimeMark.setCheckedNodes(
          value ? this.newTimeMarkList : []
        );
      } else if (type == "operationalRemarks") {
        this.$refs.operationalRemarks.setCheckedNodes(
          value ? this.operationalRemarksList : []
        );
      } else if (type == "designDesigners") {
        this.$refs.designDesigners.setCheckedNodes(
          value ? this.designDesignersList : []
        );
      } else if (type == "operationMainProducts") {
        this.$refs.operationMainProducts.setCheckedNodes(
          value ? this.operationMainProductsList : []
        );
      } else if (type == "operationLevel") {
        this.$refs.operationLevel.setCheckedNodes(
          value ? this.operationLevelList : []
        );
      } else if (type == "procureRemark") {
        this.$refs.procureRemark.setCheckedNodes(
          value ? this.procureRemarkList : []
        );
      } else if (type == "newChannel") {
        this.$refs.newChannel.setCheckedNodes(value ? this.newChannelList : []);
      }
    },
    //加载上新管理字符串树缓存数据
    localStorageStringTree(ref) {
      var applicationItem = JSON.parse(localStorage.getItem(ref));
      // var applicationItem = localStorage.getItem("application")
      if (applicationItem) {
        console.log(applicationItem);
        var that = this;

        setTimeout(function () {
          that.$nextTick(() => {
            const nodes = [];
            applicationItem.forEach((item) => {
              const node = that.$refs[ref].getNode(item);
              if (node.isLeaf) {
                //关键，过滤掉不是叶子节点的
                nodes.push(item);
              }
            });
            that.$refs[ref].setCheckedKeys(nodes, true);
          });
        }, 100);
      }
    },
    // 运营\n预览时间
    getMenuAllCheckedKeysoperationPreviewPlanTime() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.operationPreviewPlanTime.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys =
        this.$refs.operationPreviewPlanTime.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 运营\n计划上架时间
    getMenuAllCheckedKeysoperationPlanTime() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.operationPlanTime.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys = this.$refs.operationPlanTime.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 商品\n上架时间
    getMenuAllCheckedKeysnewTime() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.newTime.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys = this.$refs.newTime.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 摄影-完成拍摄时间
    getMenuAllCheckedKeysvisionShootingPlanMark() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.visionShootingPlanMark.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys =
        this.$refs.visionShootingPlanMark.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 摄影-完成拍摄时间
    getMenuAllCheckedKeysvisionShootingPlanMark() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.visionShootingPlanMark.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys =
        this.$refs.visionShootingPlanMark.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 摄影-计划拍摄时间
    getMenuAllCheckedKeysvisionShootingPlan() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.visionShootingPlan.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys = this.$refs.visionShootingPlan.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 采购-出货时间
    getMenuAllCheckedKeysshippingTime() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.shippingTime.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys = this.$refs.shippingTime.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 采购-货号数据
    getMenuAllCheckedKeysoperationalRemarks() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.operationalRemarks.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys = this.$refs.operationalRemarks.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 采购-货号数据
    getMenuAllCheckedKeysdesignDesigners() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.designDesigners.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys = this.$refs.designDesigners.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 采购-货号数据
    getMenuAllCheckedKeysnewTimeMark() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.newTimeMark.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys = this.$refs.newTimeMark.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 采购-货号数据
    getMenuAllCheckedKeysproductNo() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.productNo.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys = this.$refs.productNo.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 采购备注-所有菜单节点数据
    getMenuAllCheckedKeysprocureRemark() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.procureRemark.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys = this.$refs.procureRemark.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 商品-主推款-所有菜单节点数据
    getMenuAllCheckedKeysoperationMainProducts() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.operationMainProducts.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys =
        this.$refs.operationMainProducts.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 运营-层级-所有菜单节点数据
    getMenuAllCheckedKeysoperationLevel() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.operationLevel.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys = this.$refs.operationLevel.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    //商品-上新渠道-所有菜单节点数据
    getMenuAllCheckedKeysnewChannel() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.newChannel.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys = this.$refs.newChannel.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 主面料名称-所有菜单节点数据
    getMenuAllCheckedKeysdesignFabricName() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.designFabricName.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys = this.$refs.designFabricName.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    // 拍摄样板进度-所有菜单节点数据
    getMenuAllCheckedKeys() {
      // 目前被选中的菜单节点
      let checkedKeys = this.$refs.designShootingSample.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys =
        this.$refs.designShootingSample.getHalfCheckedKeys();
      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
      return checkedKeys;
    },
    //取筛选值
    chatgpt(visionShootingPlan) {
      var obj = this.queryParams;

      // delete obj.visionShootingPlanList;
      // delete obj.shippingTimeList;
      // delete obj.designShootingSampleList;
      // delete obj.designSize;
      // delete obj.operationPlanTimeList;
      // delete obj.designFabricNameList;
      // delete obj.newTimeMarkList;
      // delete obj.productNoList;
      console.log(JSON.stringify(obj));
      // return
      selectStaticTime({ dateName: visionShootingPlan, ...obj }).then((res) => {
        console.log(JSON.stringify(res));
        if (visionShootingPlan == "visionShootingPlan") {
          this.visionShootingPlan = res;
        } else if (visionShootingPlan == "visionShootingPlanMark") {
          this.visionShootingPlanMark = res;
        } else if (visionShootingPlan == "shippingTime") {
          this.visionShippingTime = res;
        } else if (visionShootingPlan == "newTime") {
          this.visionNewTime = res;
        } else if (visionShootingPlan == "operationPlanTime") {
          this.visionoperationPlanTime = res;
        } else if (visionShootingPlan == "operationPreviewPlanTime") {
          this.visionoperationPreviewPlanTime = res;
        }
      });
    },

    //未上架，已上架
    changeTheme(val) {
      console.log(val);
      localStorage.removeItem("shippingTime");
      localStorage.removeItem("visionShootingPlan");
      localStorage.removeItem("visionShootingPlanMark");

      localStorage.removeItem("newTime");
      localStorage.removeItem("operationPlanTime");
      localStorage.removeItem("operationPreviewPlanTime");
      localStorage.removeItem("operationalRemarks");
      localStorage.removeItem("designDesigners");
      localStorage.removeItem("newTimeMark");
      localStorage.removeItem("productNo");
      localStorage.removeItem("designFabricName");
      localStorage.removeItem("application"); //designShootingSample的别名，不删
      localStorage.removeItem("designShootingSample");
      localStorage.removeItem("operationLevel");
      localStorage.removeItem("operationMainProducts");
      localStorage.removeItem("newChannel");
      localStorage.removeItem("procureRemark");
      var obj = this.queryParams;

      delete obj.visionShootingPlanList;
      delete obj.shippingTimeList;
      delete obj.visionShootingPlanMarkList;
      delete obj.operationPlanTimeList;
      delete obj.newTimeList;

      delete obj.newChannelList;
      delete obj.procureRemarkList;
      delete obj.designShootingSampleList;
      delete obj.designSize;
      delete obj.designFabricNameList;
      delete obj.newTimeMarkList;
      delete obj.productNoList;
      delete obj.operationalRemarksList;
      delete obj.designDesignersList;
      delete obj.operationLevelList;
      delete obj.operationMainProductsList;
      if (val == 0) {
        this.isShippingTime = true;
      } else {
        this.isShippingTime = false;
      }
      this.getList({ newStatus: val });
    },
    //表头
    renderheader(h, { column, $index }) {
      return h("div", {}, [
        h("div", {}, column.label.split("\n")[0]),
        h("div", {}, column.label.split("\n")[1]),
      ]);
    },

    //侧边栏操作
    showColumnOption() {
      // this.isShowColumn = true;
      this.$router.push({ path: "/edit/li" });
    },
    saveColumn() {
      localStorage.setItem("columnSet", JSON.stringify(this.checkList));
      this.isShowColumn = false;
    },
    tableRowClassName({ row, column, rowIndex, columnIndex }) {
      // console.log(JSON.stringify(column))
      if (columnIndex == 0) {
        //全选反选
        return "color: #515a6e;background:#ccc !important;";
      } else if (column.label == "采购\n上新记录ID") {
        //上新id
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "商品\n品牌信息") {
        //品牌信息
        return "background:#ed7d31 !important;color:#fff ";
      } else if (column.label == "商品\n季节") {
        //商品\n季节
        return "background:#ed7d31 !important;color:#fff";
      } else if (column.label == "采购\n货号") {
        //货号

        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n产品图片") {
        //产品图

        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n颜色属性") {
        //可选颜色

        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n备注") {
        //采购备注

        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "商品\n主推款") {
        //主推款

        return "background:#ed7d31 !important;color:#fff";
      } else if (column.label == "运营\n层级") {
        //层级

        return "color: #515a6e;background:#ffff00 !important;";
      } else if (column.label == "运营\n主色/辅色") {
        //运营-主色/辅色

        return "color: #515a6e;background:#ffff00 !important;";
      } else if (column.label == "商品\n销售价格") {
        //销售价格

        return "background:#ed7d31 !important;color:#fff";
      } else if (column.label == "商品\n吊牌价格") {
        //吊牌价格

        return "background:#ed7d31 !important;color:#fff";
      } else if (column.label == "商品\n一级类目") {
        //一级类目

        return "background:#ed7d31 !important;color:#fff";
      } else if (column.label == "商品\n二级类目") {
        //一级类目

        return "background:#ed7d31 !important;color:#fff";
      } else if (column.label == "商品\n三级类目") {
        //商品-三级类目

        return "background:#ed7d31 !important;color:#fff";
      } else if (column.label == "采购\n可选尺码") {
        //"可选码段"

        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n下单数量") {
        //"下单数量"

        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n确认下单时间") {
        //确认下单时间
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n生产厂家") {
        //生产厂家
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n织坯期(天)") {
        //面料织胚周期
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n染色期(天)") {
        //面料染色周期
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n车间生产周期(天)") {
        //车间生产周期（天）
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n出货时间") {
        //采购-出货时间
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "摄影\n计划拍摄时间") {
        //计划拍摄时间

        return "color: white;background:#44546a !important";
      } else if (column.label == "摄影\n完成拍摄时间") {
        //摄影-完成拍摄时间
        return "color: white;background:#44546a !important";
      } else if (column.label == "设计\n设计师") {
        //设计师
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n系列") {
        //系列
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n主题") {
        //主题
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n样品特殊情况") {
        //样品特殊情况
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n样品特殊情况(图片)") {
        //样品特殊情况（图片）
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n搭配(货号)") {
        //搭配（货号）
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n搭配(图片)") {
        //搭配（图片）
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n其他搭配货号") {
        //推荐其他搭配（货号）
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n其他搭配图片") {
        //推荐其他搭配（图片）
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n场景名") {
        //场景名
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n拍摄场景建议") {
        //拍摄场景建议
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n拍摄样板进度") {
        //拍摄样板进度
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n培训") {
        //培训
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n培训操作") {
        //设计-培训
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "采购\nlogo图片") {
        //采购-logo图片
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\nlogo位置") {
        //采购-logo位置
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n面料成分") {
        //采购-面料成分
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n面料功能") {
        //面料功能
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n主面料名称") {
        //面料名称
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "设计\n产品分类") {
        //产品分类
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n胸垫/裤裆") {
        //胸垫/裤裆
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n防震程度/腰高") {
        //防震程度/腰高
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n聚拢程度") {
        //聚拢程度
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n里料材质") {
        //里料材质
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n建议尺码") {
        //建议尺码
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n尺码") {
        //尺码
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n特殊面料信息") {
        //特殊面料信息
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n特别呈现卖点") {
        //设计-特别呈现卖点增加洗涤说明
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "文案\n精细化详情页") {
        //精细化详情页
        return "color: #515a6e;background:#ff9999 !important;";
      } else if (column.label == "文案\n功能展示") {
        //功能展示
        return "color: #515a6e;background:#ff9999 !important;";
      } else if (column.label == "文案\n细节展示") {
        //细节展示
        return "color: #515a6e;background:#ff9999 !important;";
      } else if (column.label == "文案\n设计原理") {
        //设计原理
        return "color: #515a6e;background:#ff9999 !important;";
      } else if (column.label == "文案\n海报文案") {
        //海报文案
        return "color: #515a6e;background:#ff9999 !important;";
      } else if (column.label == "运营\n主图卖点提炼") {
        //主图卖点提炼
        return "color: #515a6e;background:#ffff00 !important;";
      } else if (column.label == "文案\n精细化主图卖点") {
        //精细化主图卖点文案
        return "color: #515a6e;background:#ff9999 !important;";
      } else if (column.label == "文案\n视频文案") {
        //视频文案
        return "color: #515a6e;background:#ff9999 !important;";
      } else if (column.label == "文案\n家族分类") {
        //面料家族
        return "color: #515a6e;background:#ff9999 !important;";
      } else if (column.label == "文案\n面料昵称") {
        //面料昵称
        return "color: #515a6e;background:#ff9999 !important;";
      } else if (column.label == "文案\n小别名") {
        //小别名
        return "color: #515a6e;background:#ff9999 !important;";
      } else if (column.label == "摄影\n是否拍摄平面") {
        //摄影-是否拍摄平面

        return "color: white;background:#44546a !important";
      } else if (column.label == "摄影\n是否拍摄视频") {
        //摄影-是否拍摄视频

        return "color: white;background:#44546a !important";
      } else if (column.label == "视觉\n是否拍3D图、细节") {
        //是否拍3D图、细节
        return "color: #515a6e;background:#e0b6fb !important;";
      } else if (column.label == "视觉\n修图进度") {
        //修图进度
        return "color: #515a6e;background:#e0b6fb !important;";
      } else if (column.label == "摄影\n视频剪辑进度") {
        //摄影-视频剪辑进度

        return "color: white;background:#44546a !important";
      } else if (column.label == "商品\n上架时间") {
        //商品\n上架时间
        return "background:#ed7d31 !important;color:#fff";
      } else if (column.label == "商品\n上架时间备注") {
        //商品\n上架时间备注
        return "background:#ed7d31 !important;color:#fff";
      } else if (column.label == "商品\n上新渠道") {
        //商品\n上新渠道
        return "background:#ed7d31 !important;color:#fff";
      } else if (column.label == "运营\n计划上架时间") {
        //运营\n计划上架时间

        return "color: #515a6e;background:#ffff00 !important;";
      } else if (column.label == "运营\n预览时间") {
        //运营\n预览架时间

        return "color: #515a6e;background:#ffff00 !important;";
      } else if (column.label == "运营\n备注") {
        //运营\n备注

        return "color: #515a6e;background:#ffff00 !important;";
      } else if (column.label == "运营\n京东-是否上架") {
        //运营-是否上架

        return "color: #515a6e;background:#ffff00 !important;";
      } else if (column.label == "运营\n京东-主推款") {
        //运营主推款

        return "color: #515a6e;background:#ffff00 !important;";
      } else if (column.label == "设计\n属性类别/商品描述") {
        //属性类别/商品描述
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n版型/罩杯") {
        //版型/罩杯
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n适合体型") {
        //适合体型（胸型
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n衣长/裤长") {
        //衣长/裤长
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n运动强度") {
        //运动强度
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n弹性") {
        //弹性
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n健身层级") {
        //健身层级
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n体感") {
        //体感
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n柔软度") {
        //柔软度
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n面料厚度") {
        //面料厚度
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "设计\n透气度") {
        //透气度
        return "color: #515a6e;background:#ffc000 !important;";
      } else if (column.label == "采购\n修改备注说明") {
        //采购-修改备注说明
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n辅料修改前图片") {
        //采购-辅料修改前图片
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n辅料修改后图片") {
        //采购-辅料修改后图片
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "视觉\n图片路径") {
        //视觉路径
        return "color: #515a6e;background:#e0b6fb !important;";
      } else if (column.label == "运营\n渠道链接") {
        //运营-渠道链接
        return "color: #515a6e;background:#ffff00 !important;";
      } else if (column.label == "采购\n成衣检测报告") {
        // 采购-质检报告

        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label == "采购\n面料检测报告") {
        //设计-面料检测报告

        return "color: #515a6e;background:#c4dbf0 !important;";
      }
    },

    //添加颜色列表获得焦点
    onFocus() {
      this.getData();
      // if (!this.form.colorProperty) {
      //     this.$selectRef.value.blur() //就是这一句，
      // }
    },

    /* 获取颜色列表 */
    getData(key) {
      console.log(JSON.stringify(key));
      // this.loading = true;
      // return
      productNoColorLike({ productNo: this.form.productNo, color: key }).then(
        (res) => {
          // this.loading = false;
          this.ColorLike = res.data;
          console.log(JSON.stringify(this.ColorLike));
        }
      );
    },

    /* 获取货号列表 */
    getDatas(key) {
      console.log(JSON.stringify(key));
      this.loading = true;
      // return
      productNoLike(key).then((res) => {
        this.loading = false;
        this.options = res.data;
        console.log(JSON.stringify(this.options));
      });
    },

    //部门树形多选
    handleContentCheck(n, obj) {
      console.log("n====>", JSON.stringify(n));
      console.log("obj====>", JSON.stringify(obj));
      console.log(JSON.stringify(obj.checkedNodes));
      let j = [];
      obj.checkedNodes.forEach((item) => {
        j.push(item.id);
      });
      console.log(JSON.stringify(j));
      this.f.deptIds = j;
    },
    //选择对应部门
    handleNodeClick(data) {
      console.log(1);
      const id = data.id;
      console.log(data.id);
    },
    //搜索栏展示与收起
    shouqi() {
      // console.log(1);
      this.isOpen = !this.isOpen;
    },
    //批量模板下载
    currentRoleTemplate() {
      getcurrentRoleTemplate().then((response) => {
        let value = response.data.templateUrlFull;
        window.location.href = value;
      });
    },
    //质检报告下载
    downLoadFile(value) {
      if (!value) {
        this.$modal.msgError("该货号没有上传附件，请选择至少一个文件！");
        return;
      }
      console.log(JSON.stringify(value));
      window.location.href = this.pjtUrl + value;

      // download.resource(value)
      //根据文件路径参数，按斜杠进行分割，取得文件名，这是download函数需要的第三个参数
      let list = value.split("/");
      let fileName = list[list.length - 1];
      //这是文件路径参数，因为download函数需要传三个参数，这是第二个参数
      let params = {
        resource: value,
      };
      /** request里面的download下载函数 */
      //download函数是若依自带的，第一个参数是请求的url路径，不需要变，这个路径下的controller后台方法也是若依写好封装好了的。
      // download("/common/download/resource", params, fileName);
      // console.log("文件名");
      // console.log("value");
    },
    //通知提交
    submit() {
      if (!this.f.deptIds) {
        this.$modal.msgError("请选择至少一个部门！");
        return;
      }
      var str = "";
      //上新id

      const names = this.list.map((user) => user.proNewId);
      console.log(names);
      //货号
      const na = this.list.map((user) => user.productNo);
      console.log(na);
      //颜色
      const name = this.list.map((user) => user.colorProperty);
      console.log(name);
      for (let i = 0; i < names.length; i++) {
        console.log(names[i]);
        console.log(na[i]);
        console.log(name[i]);
        str +=
          "上新ID:" + name[i] + ",货号:" + na[i] + ",颜色:" + name[i] + "\n";
      }
      console.log(JSON.stringify(str));

      this.f.remindTitle = this.remindTitle;
      this.f.remindContent = str + "通知内容：" + this.remindContent + "。";
      console.log(JSON.stringify(this.f));
      // return
      add(this.f).then((response) => {
        console.log(response);
        this.$modal.msgSuccess("发布成功");
        this.isVisible = false;
        this.remindContent = "";
        this.remindTitle = "";
        this.$store.dispatch("getUnreadMessagesCount");
      });
    },

    /** 根据角色ID查询部门树结构 */
    getDeptTree(roleId) {
      return deptTreeNew(roleId).then((response) => {
        let j = [];
        let m = response.depts;
        m.forEach((item) => {
          if (item.children) {
            item.children.forEach((item2, i) => {
              console.log(JSON.stringify(item2));
              // j.push(item2[i].)
              if (item2.children) {
                item2.children.forEach((item3) => {
                  console.log(JSON.stringify(item3));
                  j.push(item3);
                });
              }
            });
          }
        });
        this.deptOptions = j;
        console.log(JSON.stringify(this.deptOptions));
        // 存放选中的数据
        // this.addStageLabelList = deptTreeSelect
        // console.log(JSON.stringify(this.addStageLabelList));
        return response;
      });
    },
    //关闭通知
    dialogBeforeClose() {
      this.isVisible = false;
    },
    handleSortChange(column) {
      /**
  排序方向 asc 升序 desc 降序
 
private String orderDirection;*/
      switch (column.order) {
        case "ascending":
          this.queryParams.orderDirection = "asc";
          break;
        case "descending":
          this.queryParams.orderDirection = "desc";
          break;
        default:
          this.queryParams.orderDirection = null;
          break;
      }

      this.queryParams.orderColumn = column.prop; //查询字段是表格中字段名字
      // this.queryParams.orderDirection = column.order;//动态取值排序顺序
      this.getList();
    },
    //缓存
    tableEdit(row, column, cell, event) {
      let vmEl = this.$refs["table"].$el;
      console.log(vmEl);
      const scrollParent = vmEl.querySelector(".el-table__body-wrapper");
      // this.Nowscroll = scrollParent.scrollTop
      // console.log(this.queryParams);
      console.log(scrollParent.scrollLeft);
      // return
      // return
      var otherVal = {
        currentPage: this.queryParams.pageNum,
        pageSize: this.queryParams.pageSize,
        scrollTop: scrollParent.scrollTop,
        scrollLeft: scrollParent.scrollLeft,

        // "productNo": this.queryParams.productNo,
        // "colorProperty": this.queryParams.colorProperty,
        // "manufacturerCode": this.queryParams.manufacturerCode,
        // "procureRemark": this.queryParams.procureRemark
      };
      localStorage.setItem("otherVal", JSON.stringify(otherVal));
      localStorage.setItem("storeForm", JSON.stringify(this.queryParams));

      // if (column.label == '设计\n培训' | column.label == '运营\n计划上架时间') {
      //     // getInfo().then(res => {
      //     if (this.userInfo == "design" | this.userInfo == "designer" | this.userInfo == "designAll") {
      //         row[column.property + 'isShow'] = true
      //     } else if (this.userInfo == "operate") {
      //         row[column.property + 'isShowoperationPlanTime'] = true
      //     }
      //     else {
      //         row[column.property + 'isShow'] = false
      //         row[column.property + 'isShowoperationPlanTime'] = false
      //     }
      //     // })
      //     //这里是点击让el-input显示

      //     //这里是编辑完一个存一个，存到list1里面，且将重复编辑的去掉（去重）
      //     for (let index in this.list1) {
      //         if (this.list1[index].id == row.id) {
      //             this.list1.splice(index, 1)
      //         }
      //     }
      //     this.list1.push(row)
      //     console.log(JSON.stringify(this.list1));
      //     // refreshTable是table数据改动时，刷新table的
      //     this.refreshTable()
      //     this.$nextTick(() => {
      //         this.$refs[column.property] && this.$refs[column.property].focus()
      //     })
      // }
    },
    // operationPlanTimeData(row, column) {
    //     row[column.property + 'isShowoperationPlanTime'] = false
    //     //this.refreshTable(),每编辑一个单元格，就会更新一下表格，如果数据量较大的时候，会编辑完一个单元格，表格更新，页面就会返回到顶部，你需要找到刚编辑过的地方，继续编辑，页面体验差，所以我没加
    // },
    // //表格触发事件
    // alterData(row, column) {
    //     row[column.property + 'isShow'] = false
    //     //this.refreshTable(),每编辑一个单元格，就会更新一下表格，如果数据量较大的时候，会编辑完一个单元格，表格更新，页面就会返回到顶部，你需要找到刚编辑过的地方，继续编辑，页面体验差，所以我没加
    // },
    // //更新表格
    // refreshTable() {
    //     this.randomKey = Math.random()
    // },
    // //保存按钮
    // submitview() {
    //     updateRelation({
    //         proNewProcure: {},
    //         proNewRelation: {
    //             operationPlanTime: this.list1[0].operationPlanTime
    //         },
    //         proNewVO: { id: this.list1[0].proNewId },
    //         proTemplate: {},
    //         // proNewRelation: { },
    //         proTemplateSecondry: {
    //             id: this.list1[0].templateSecondryId,
    //             designTraining: this.list1[0].designTraining
    //         }
    //     }).then(res => {
    //         console.log(JSON.stringify(res));
    //         this.getList()
    //     })
    // },

    //快捷编辑 , event
    handleStatusChange(row) {
      // console.log(JSON.stringify(row.designTraining));
      if (this.userInfo == "operate" || this.userInfo == "copywriting") {
        if (row.operationalRemarks) {
          if (!row.operationPlanTime) {
            //
            row.operationalRemarks = "";
            this.$alert("随到随上产品 请先选择 计划上架时间。", "提示", {
              confirmButtonText: "确定",
              showConfirmButton: false,
            });
            // this.$modal.msgError("随到随上产品 请先选择 计划上架时间");
            return;
          }
        }
      }

      updateRelation({
        proNewProcure: {
          orderTime: row.orderTime,
        },
        proNewRelation: {
          operationJingdongUploaded: row.operationJingdongUploaded,
          visionShooting3d: row.visionShooting3d,
          photographyVideo: row.photographyVideo,
          photographyPlane: row.photographyPlane,
          // 运营\n预览架时间
          operationPlanTime: row.operationPlanTime,
          operationPreviewPlanTime: row.operationPreviewPlanTime,
          operationalRemarks: row.operationalRemarks,
        },
        proNewVO: { id: row.proNewId, proNewSizeList: row.proNewSizeList },
        proTemplate: {},
        // proNewRelation: { },
        proTemplateSecondry: {
          id: row.templateSecondryId,
          designTraining: row.designTraining,
          designShootingSample: row.designShootingSample,
        },
      }).then((response) => {
        console.log(JSON.stringify(response));

        if (response.code == 200) {
          this.$modal.msgSuccess("修改成功");
          // if (event.keyCode === 13) {
          //   this.istxChange = false;
          // }
        } else {
          this.$modal.msgError("修改失败");
        }
        // this.getList()
      });
    },
    getistxChange() {
      this.istxChange = !this.istxChange;
    },

    //培训
    view(index, row, val) {
      console.log(JSON.stringify(row));
      console.log(JSON.stringify(val));
      updateRelation({
        proNewProcure: {},
        proNewRelation: {},
        proNewVO: { id: row.proNewId },
        proTemplate: {},
        // proNewRelation: { },
        proTemplateSecondry: {
          id: row.templateSecondryId,
          designTraining: val,
        },
      }).then((res) => {
        console.log(JSON.stringify(res));
        this.getList();
      });
      // updateRemind({ id: row.id, isRead: val }).then(res => {
      //     this.getList()
      // })
      // console.log();
    },

    //点击某一行
    t(row, column, cell, event) {
      console.log(row, column, cell, event);
      console.log(JSON.stringify(event));
      // his.refs.[orderTable[.
      // let vmEl = this.$refs["table"].el

      // localStorage.setItem("columnSet", JSON.stringify(scrollParent.scrollTop))

      // return
      // let libubai = true
      // if (this.libubai) {
      //     this.libubai = false
      //     return
      // } else {

      getInfo().then((res) => {
        // console.log(JSON.stringify(res));
        if (res.roles.indexOf("admin") > -1) {
          this.$router.push({
            path: "/edit/operation",
            query: { id: row.proNewId },
          });
        }
        if (res.roles.indexOf("purchase") > -1) {
          this.$router.push({
            path: "/edit/purchase",
            query: { id: row.proNewId },
          });
        }
        //商品
        if (res.roles.indexOf("merchandise") > -1) {
          this.$router.push({
            path: "/edit/merchandise",
            query: { id: row.proNewId },
          });
        }
        //运营
        if (
          res.roles.indexOf("operate") > -1 ||
          res.roles.indexOf("operate-new") > -1
        ) {
          this.$router.push({
            path: "/edit/operation",
            query: { id: row.proNewId },
          });
        }
        //视觉
        if (res.roles.indexOf("vision") > -1) {
          this.$router.push({
            path: "/edit/vision",
            query: { id: row.proNewId },
          });
        }
        //设计
        if (res.roles.indexOf("design") > -1) {
          this.$router.push({
            path: "/edit/design",
            query: { id: row.proNewId },
          });
        }
        if (res.roles.indexOf("designer") > -1) {
          this.$router.push({
            path: "/edit/designer",
            query: { id: row.proNewId },
          });
        }
        if (res.roles.indexOf("designAll") > -1) {
          this.$router.push({
            path: "/edit/designAll",
            query: { id: row.proNewId },
          });
        }
        //文案
        if (res.roles.indexOf("copywriting") > -1) {
          this.$router.push({
            path: "/edit/copywriting",
            query: { id: row.proNewId },
          });
        }
        //拍摄
        if (res.roles.indexOf("shot") > -1) {
          this.$router.push({
            path: "/edit/shot",
            query: { id: row.proNewId },
          });
        }
        //客服
        // if (res.roles.indexOf("customer") > -1) {
        //     this.$router.push({ path: '/edit/customer', query: { id: row.proNewId } })
        // }

        //     this.libubai = true
      });

      // }
      // console.log('被点击了');

      // console.log(row.title);
    },

    //回车失去焦点
    enterBlur(event) {
      event.target.blur();
    },
    test1(val) {
      listData({ dictType: "sys_product_qudao" }).then((response) => {
        console.log(JSON.stringify(response.rows));
        if (val == "1") {
          // response.rows.forEach(item=>{
          //   this.newChannel.push(item)
          // })
          for (let i = 0; i < response.rows.length; i++) {
            const element = response.rows[i];
            this.newChannel.push(element.dictValue);
          }
        }
      });
      console.log(val);
      console.log(this.newChannel);
      let label = [];
      // this.checked = val;
      // this.checkList.forEach(item => {
      //   this.checked.forEach(j => {
      //     if (item.id == j) {
      //       // console.log(item.label);
      //       label.push({ size: item.label })
      //     }

      //   })

      // })
      this.newChannel.forEach((item) => {
        if (item !== "1") {
          label.push({ newChannel: item, newChannelName: item });
        }
      });
      if (label == null) {
        this.$modal.msgError("请选择至少一个渠道！");
        return;
      }
      // this.newChannel = label

      return label;

      this.$forceUpdate();
    },
    test(val) {
      let label = [];
      // this.checked = val;
      // this.checkLi.forEach(item => {
      //     this.checked.forEach(j => {
      //         if (item.id == j) {
      //             // console.log(item.label);
      //             label.push({ size: item.label })
      //             // label.push(item.label)
      //         }

      //     })

      // })
      this.checked.forEach((item) => {
        label.push({ size: item });
      });
      if (label == null) {
        this.$modal.msgError("请选择至少一个尺寸！");
        return;
      }
      console.log(label);
      this.form.sizeList = label;

      this.$forceUpdate();
    },
    //渠道合并
    formatDatanewChannel(row) {
      let rowPerson = (row && row.channelList) || [];
      let arr = [];
      rowPerson.forEach((item) => {
        //如果数据特别多的话,还可以在这里加if判断,仅展示规定的数据
        arr.push(item.newChannel);
      });
      //
      return arr.join("/");
    },
    //尺码合并
    formatData(row) {
      let rowPerson = (row && row.proNewSizeList) || [];
      let arr = [];
      rowPerson.forEach((item) => {
        //如果数据特别多的话,还可以在这里加if判断,仅展示规定的数据
        arr.push(item.size);
      });
      //
      return arr.join("/");
    },
    //出货，未出货
    changeShippingTime() {
      localStorage.removeItem("shippingTime");
      localStorage.removeItem("visionShootingPlan");
      localStorage.removeItem("visionShootingPlanMark");

      localStorage.removeItem("newTime");
      localStorage.removeItem("operationPlanTime");
      localStorage.removeItem("operationPreviewPlanTime");

      localStorage.removeItem("operationalRemarks");
      localStorage.removeItem("designDesigners");
      localStorage.removeItem("newTimeMark");
      localStorage.removeItem("productNo");
      localStorage.removeItem("designFabricName");
      localStorage.removeItem("application"); //designShootingSample的别名，不删
      localStorage.removeItem("designShootingSample");
      localStorage.removeItem("operationMainProducts");
      localStorage.removeItem("operationLevel");
      localStorage.removeItem("newChannel");
      localStorage.removeItem("procureRemark");
      var obj = this.queryParams;

      delete obj.visionShootingPlanList;
      delete obj.shippingTimeList;
      delete obj.visionShootingPlanMarkList;
      delete obj.operationPlanTimeList;
      delete obj.newTimeList;

      delete obj.newChannelList;
      delete obj.procureRemarkList;
      delete obj.operationMainProductsList;
      delete obj.operationLevelList;
      delete obj.designShootingSampleList;
      delete obj.designSize;
      delete obj.designFabricNameList;
      delete obj.newTimeMarkList;
      delete obj.productNoList;
      delete obj.operationalRemarksList;
      delete obj.designDesignersList;
      this.getList();
    },
    /** 查询产品二级信息列表 */
    postList() {
      this.loading = true;

      SelectList(this.queryParams).then((response) => {
        this.relationList = response.rows;
        console.log(JSON.stringify(this.relationList));

        this.total = response.total;
        this.loading = false;
      });
    },
    /** 查询产品二级信息列表 */
    getList() {
      this.openUpload = false;
      // 运营-备注
      var designDesigners = JSON.parse(localStorage.getItem("designDesigners"));
      if (designDesigners) {
        let Data = designDesigners.map(
          (item) => this.designDesignersList.filter((i) => i?.id == item)[0]
        );
        console.log(JSON.stringify(Data));
        this.queryParams.designDesignersList = Data.map(
          (user) => user.label
        ).join(",");
      }

      // 运营-备注
      var operationalRemarks = JSON.parse(
        localStorage.getItem("operationalRemarks")
      );
      if (operationalRemarks) {
        let Data = operationalRemarks.map(
          (item) => this.operationalRemarksList.filter((i) => i?.id == item)[0]
        );
        console.log(JSON.stringify(Data));
        this.queryParams.operationalRemarksList = Data.map(
          (user) => user.label
        ).join(",");
      }

      // 设计-拍摄样板进度
      var designShootingSample = JSON.parse(
        localStorage.getItem("designShootingSample")
      );
      if (designShootingSample) {
        let Data = designShootingSample.map(
          (item) =>
            this.designShootingSampleList.filter((i) => i?.id == item)[0]
        );
        console.log(JSON.stringify(Data));
        this.queryParams.designShootingSampleList = Data.map(
          (user) => user.label
        ).join(",");
      }
      // 采购-货号
      var productNo = JSON.parse(localStorage.getItem("productNo"));
      if (productNo) {
        let Data = productNo.map(
          (item) => this.productNoList.filter((i) => i?.id == item)[0]
        );
        console.log(JSON.stringify(Data));
        this.queryParams.productNoList = Data.map((user) => user.label).join(
          ","
        );
      }
      // 采购-主面料名称
      var designFabricName = JSON.parse(
        localStorage.getItem("designFabricName")
      );
      if (designFabricName) {
        let Data = designFabricName.map(
          (item) => this.designFabricNameList.filter((i) => i?.id == item)[0]
        );
        console.log(JSON.stringify(Data));
        this.queryParams.designFabricNameList = Data.map(
          (user) => user.label
        ).join(",");
      }
      // 商品-上架时间备注
      var newTimeMark = JSON.parse(localStorage.getItem("newTimeMark"));
      if (newTimeMark) {
        let Data = newTimeMark.map(
          (item) => this.newTimeMarkList.filter((i) => i?.id == item)[0]
        );
        console.log(JSON.stringify(Data));
        this.queryParams.newTimeMarkList = Data.map((user) => user.label).join(
          ","
        );
      }
      //页面跳转
      var otherVal = JSON.parse(localStorage.getItem("otherVal"));
      if (otherVal) {
        // this.$set(this.queryParams, "pageNum", otherVal.currentPage);
        // this.$set(this.queryParams, "pageSize", otherVal.pageSize);

        this.Nowscroll = otherVal.scrollTop;
        this.scrollLeft = otherVal.scrollLeft;
      }

      console.log(JSON.stringify(this.queryParams));
      this.loading = true;

      listRelation(this.queryParams).then((response) => {
        this.relationList = response.rows;
        console.log(JSON.stringify(this.relationList));

        this.total = response.total;
        this.loading = false;
        setTimeout(() => {
          this.$refs["table"].$el.querySelector(
            ".el-table__body-wrapper"
          ).scrollTop = this.Nowscroll;
          this.$refs["table"].$el.querySelector(
            ".el-table__body-wrapper"
          ).scrollLeft = this.scrollLeft;
          // this.$nextTick(() => {
          //     this.$refs.table.doLayout();
          // });
        }, 13);
        // this.$route.query.id = null
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.isVisible = false;
      this.reset();
    },
    //部门文件导入修改打开
    daoru() {
      this.dialogVisible = true;
    },
    // 表单重置
    reset() {
      this.newChannel = [];
      this.checked = []; //加的是这一行
      // this.files = undefined;//加的是这一行
      // this.fileList = undefined;//加的是这一行
      this.form = {
        id: null,
        templateId: null,
        templateSecondryId: null,
        newTime: null,
        newTimeMark: null,
        newChannel: null,
        // picName: null,
        // picUrl: null,
        colorProperty: null,
        productNo: null,
        manufacturerCode: null,
        // salePrice: null,
        // tagPrice: null,
        // logoName: null,
        // logoUrl: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        newStatus: 0,
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.queryParams.pageSize = 10;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      localStorage.removeItem("shippingTime");
      localStorage.removeItem("visionShootingPlan");
      localStorage.removeItem("visionShootingPlanMark");

      localStorage.removeItem("newTime");
      localStorage.removeItem("operationPlanTime");
      localStorage.removeItem("operationPreviewPlanTime");

      localStorage.removeItem("operationMainProducts");
      localStorage.removeItem("operationLevel");
      localStorage.removeItem("newChannel");
      localStorage.removeItem("procureRemark");
      localStorage.removeItem("operationalRemarks");
      localStorage.removeItem("designDesigners");
      localStorage.removeItem("newTimeMark");
      localStorage.removeItem("productNo");
      localStorage.removeItem("designFabricName");
      localStorage.removeItem("application"); //designShootingSample的别名，不删
      localStorage.removeItem("designShootingSample");
      localStorage.removeItem("columnSet");
      localStorage.removeItem("otherVal");
      // this.queryParams.templateId = null
      this.resetForm("queryForm");
      localStorage.removeItem("storeForm");
      this.queryParams = {};
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.list = selection.map((item) => item);
      this.chatlist = this.list;
      console.log(JSON.stringify(this.chatlist));
      this.ids = selection.map((item) => item.proNewId);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加产品上新";
    },
    //通知按钮打开
    chat(row) {
      if (this.list.length == 0) {
        this.$modal.msgError("请选择一条记录");
        return;
      }

      // this.getDeptTree(1);

      this.isVisible = true;
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.proNewId || this.ids;
      console.log(id);

      getRelation(id).then((response) => {
        this.proNewVO = response.data.proNewVO;

        this.form = response.data.proNewVO;
        console.log(JSON.stringify(this.form));
        //尺寸回显
        if (
          response.data.proNewVO.proNewSizeList &&
          response.data.proNewVO.proNewSizeList.length > 0
        ) {
          let val = response.data.proNewVO.proNewSizeList.map((item) => {
            return item.size;
          });
          console.log(val);
          this.checked = val;
          this.form.sizeList = response.data.proNewVO.proNewSizeList.map(
            (item) => {
              return { size: item.size };
            }
          );
        }

        if (
          response.data.proNewVO.channelList &&
          response.data.proNewVO.channelList.length > 0
        ) {
          let val = response.data.proNewVO.channelList.map((item) => {
            // if (!item.newChannel == null) {
            return item.newChannel;

            // }
          });
          console.log(val);
          this.newChannel = val;
        }

        this.open = true;
        this.title = "修改产品上新";
      });
    },
    pickerChangeFn() {
      if (this.form.newTime == null) {
        //

        this.form.newTimeNull = 1;
      }
    },
    /** 提交按钮 */
    submitForm() {
      this.form.channelList = this.test1();

      for (var item in this.form) {
        if (item == "proNewSizeList") {
          delete this.form[item];
        }
      }

      console.log(JSON.stringify(this.form));

      if (this.form.sizeList == null) {
        this.$modal.msgError("请选择尺寸！");
        return;
      }

      console.log(JSON.stringify(this.form));
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.id != null) {
            updateNew(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addNew(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              // location.reload();
              // this.$router.push({ path: '/product/new' })
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal
        .confirm('是否确认删除产品上新编号为"' + ids + '"的数据项？')
        .then(function () {
          return delNew(ids);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => { });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download(
        "product/relation/export",
        {
          ...this.queryParams,
          isDownloadPic: true,
        },
        `relation_${new Date().getTime()}.xlsx`
      );
    },
    /** 导出按钮操作 */
    handleExportPic() {
      this.download(
        "product/relation/export",
        {
          ...this.queryParams,
          isDownloadPic: false,
        },
        `relation_${new Date().getTime()}.xlsx`
      );
    },
    //图片上传前的相关判断
    beforeAvatarUpload(file) {
      // const isJPG = file.type == 'image/jpeg' || file.type == 'image/png';
      const isLt2M = file.size / 1024 / 1024 < 5;
      // if (!isJPG) {
      //     this.$message.error('上传头像图片只能是 JPG/PNG 格式!');
      // }
      if (!isLt2M) {
        this.$message.error("上传头像图片大小不能超过 5MB!");
      }
      return isLt2M;
    },
    //图片预览
    handlePictureCardPreview(file) {
      this.picUrl = file.url;
      this.imageUrl = file.url;
      // this.dialogVisible = true;
    },

    //文件导入成功回传

    handlePictureSuccessPic(res, file) {
      console.log(JSON.stringify(res));
      //设置图片访问路径 （url 后台传过来的的上传地址）
      // this.picUrl = file.response.url;
      // const url = file.response.fileName;
      this.file = file.response.url;
      console.log(JSON.stringify(this.file));
      if (res.code == 200) {
        this.dialogVisible = false;

        if (res.msg == "操作成功") {
          this.$modal.msgSuccess("导入成功");
        } else {
          this.$modal.msgError(res.msg);
        }
        this.getList();
        // return true
      } else {
        this.$modal.msgError(res.msg);
        this.dialogVisible = true;
        // this.$message.msgError('该颜色未在字典定义')
        return;
      }
    },

    // 文件个数超出
    handleExceed() {
      this.$modal.msgError(`上传链接文件数量不能超过 ${this.limit} 个!`);
    },
    // 上传文件让第二次覆盖第一的文件
    changeFile1(file, fileList) {
      if (fileList.length > 1) {
        this.fileLi = fileList.slice(-1);

        // this.fileList = [fileList[fileList.length - 1]]//这一步，是 展示最后一次选择文件
      }
      // this.fileSpecial = fileList;
    },
    // table自动高度
    returnTableHeight(ref, bottomOffset) {
      let height = null;
      height =
        window.innerHeight - ref.getBoundingClientRect().top - bottomOffset;
      return height;
    },

    resizeTable() {
      this.$nextTick(() => {
        this.tableHeight = this.returnTableHeight(this.$refs.tableDom, 100);
      }, 0);
    },

    formatStr(str) {
      if (str.includes("；")) {
        return str.split("；").join("<br>");
      } else {
        return str;
      }
    },
  },
};
</script>
<style lang="scss" scoped>
.el-dialog-div {
  height: 50vh;
  overflow-x: hidden;
}

.table-heard-filter {
  margin-right: 10px !important;
}

span.textname {
  display: -webkit-box;

  text-overflow: ellipsis;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  white-space: pre-wrap;
}

.el-input.is-disabled ::v-deep .el-input__inner {
  color: #606266;
  background-color: white;
  border: none;
}

.el-textarea.is-disabled ::v-deep .el-textarea__inner {
  color: #606266;
  background-color: white;
  border: none;
  width: 500px;
  resize: none;
  cursor: pointer;
}

.left el-tree-node__content {
  padding-left: 15px !important;
  height: 56px;
}

.left .el-tree-node__children {
  .el-tree-node__content {
    padding-left: 30px !important;
  }
}

// .el-checkbox__inner {
//     display: inline-block;
//     z-index: -1;
// }  .el-checkbox__inner

::v-deep el-checkbox {
  display: none !important;

  z-index: -1;
}

/* 1. 去除Elment-plus框架自带样式边框;2 .保证选中后高度不变 */
::deep() .el-checkbox__inner::after {
  border: none;
  width: 100%;
  height: 100%;
}

.leftStyle {
  position: absolute;
  left: -200px;
  top: 1px;
  font-size: 12px;
}

#appStyle {
  position: relative;
  top: 50px;
  left: 250px;
  width: 60%;

  // clear: both;
}

.columnOption {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: row-reverse;

  .content {
    width: 200px;
    height: 100%;
    background-color: #f5f7fa;
    // background-color: rgb(203, 223, 198);

    .head {
      width: 100%;
      height: 44px;
      border-bottom: 1px solid #000;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 12px;
    }

    .body {
      width: 100%;
      height: calc(100% - 88px);
      box-sizing: border-box;
      padding-top: 10px;
      overflow-y: auto;
      // display: flex;
      // flex-direction: row;
      /* 平分剩余空间 */
      // justify-content: space-around;

      .items {
        width: 100%;
        height: 100%;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        // justify-content:s;
        /* 平分剩余空间 */
        justify-content: space-around;

        .el-checkbox {
          width: 100%;
          height: 28px;
          line-height: 28px;
          margin-bottom: 14px;
          display: inline-block;
          font-family: PingFang SC;
          font-style: normal;
          font-weight: normal;
          font-size: 14px;
          color: #000;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          box-sizing: border-box;
          padding-left: 14px;
        }

        .el-checkbox:hover {
          background-color: #f5f7fa;
        }
      }
    }

    .footer {
      width: 100%;
      height: 44px;
      border-top: 1px solid #000;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
}

// 控制淡入淡出效果
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s;
}

.fade-enter,
.fade-leave-to {
  opacity: 0;
}
</style>

  